package cn.fl.project.controller;

import cmm.comm.facade.framework.api.ISysCdMapApiService;
import cmm.comm.facade.framework.api.ISysDictionaryApiService;
import cmm.comm.facade.framework.condition.SysCdMapDQueryCondition;
import cmm.comm.facade.framework.dto.SysCdMapDDTO;
import cmm.comm.facade.framework.dto.SysDictionaryDTO;
import cmm.comm.facade.syssms.api.ISysSmsApiService;
import cmm.comm.facade.syssms.condition.SysSmsLogQueryCondition;
import cmm.comm.facade.syssms.constant.SysConTemplatesConstant;
import cmm.comm.facade.syssms.dto.SendContextDTO;
import cmm.comm.facade.syssms.dto.SysSmsLogDTO;
import cmm.mid.core.framework.constant.tripartite.InterfaceConstants;
import cmm.mid.core.framework.dto.DataResultDTO;
import cmm.mid.core.framework.dto.MessageDTO;
import cmm.mid.core.framework.dto.tripartite.CreditDTO;
import cmm.mid.core.framework.page.DataResultVO;
import cmm.mid.core.framework.page.KeyValueVO;
import cmm.mid.core.framework.page.ListPageVO;
import cmm.mid.core.framework.page.Pager;
import cmm.web.core.framework.controller.BaseController;
import cn.cmm.base.framework.constant.BaseConstant;
import cn.cmm.base.framework.constant.BaseExceptionConstant;
import cn.cmm.base.framework.exception.BaseException;
import cn.cmm.base.framework.logger.eum.LogExceptionEnum;
import cn.cmm.base.framework.utils.*;
import cn.cmm.cache.framework.service.ICacheService;
import cn.fl.audit.constant.AudStandingBookConstant;
import cn.fl.audit.service.*;
import cn.fl.audit.vo.AudCarInfoVO;
import cn.fl.audit.vo.AudCreditInfoVO;
import cn.fl.audit.vo.AudOpeLineVO;
import cn.fl.audit.vo.AudReturnVisitVO;
import cn.fl.capital.condition.CapChnOvdRateQC;
import cn.fl.capital.dto.CapChnOvdRateDTO;
import cn.fl.capital.service.ICapChnOvdRateApiService;
import cn.fl.capital.service.ICapPayInfoService;
import cn.fl.car300.condition.InfCar300RecQueryCondition;
import cn.fl.car300.service.IInfCar300RecService;
import cn.fl.car300.vo.InfCar300RecVO;
import cn.fl.commons.result.ResponseData;
import cn.fl.customer.service.ICstBscInfoService;
import cn.fl.customer.service.ICstRlAttrService;
import cn.fl.customer.vo.CstBscInfoVO;
import cn.fl.customer.vo.CstRlAttrVO;
import cn.fl.enums.RiskCheckTypEnum;
import cn.fl.expatriate.condition.ExpBizManRecQC;
import cn.fl.expatriate.service.IExpBizManRecService;
import cn.fl.expatriate.vo.ExpBizManRecVO;
import cn.fl.framework.base.constant.WebBaseConstant;
import cn.fl.framework.base.context.CurrentThreadContext;
import cn.fl.framework.constant.DictionaryConstant;
import cn.fl.index.api.IPrjPlcyIndexApiService;
import cn.fl.index.constant.LcvCdsConstant;
import cn.fl.index.dto.LcvCdsResDTO;
import cn.fl.preloan.IAuditOpeLineService;
import cn.fl.preloan.IAuditStandingBookService;
import cn.fl.preloan.IProprdLicenseService;
import cn.fl.preloan.condition.AuditCarInfoQueryCondition;
import cn.fl.preloan.constants.AuditConstans;
import cn.fl.preloan.condition.AuditCreditInfoQueryCondition;
import cn.fl.preloan.condition.PrjPreAudInfoQueryCondition;
import cn.fl.preloan.dto.GetPrjPrdLicInfoListRequest;
import cn.fl.preloan.dto.GetPrjPrdLicInfoListResponseDTO;
import cn.fl.preloan.dto.audit.AuditOpeLineDTO;
import cn.fl.preloan.dto.audit.GetAudOpeLineByVisitIdRequest;
import cn.fl.preloan.dto.prjpreaudinfo.PrjPreAudInfoDTO;
import cn.fl.preloan.prjpreaudinfo.IPrjPreAudInfoApiService;
import cn.fl.project.api.IPrjPaySchMYqApiService;
import cn.fl.project.condition.*;
import cn.fl.project.constant.*;
import cn.fl.project.dto.PrjBscInfoDTO;
import cn.fl.project.dto.PrjPaySchMYqDTO;
import cn.fl.project.dto.PrjPrdDtlDTO;
import cn.fl.project.service.*;
import cn.fl.project.transform.PrjBscInfoVOTransform;
import cn.fl.project.vo.*;
import cn.fl.risk.service.IRskCstSignLogService;
import cn.fl.risk.service.IRskPrdSignLogService;
import cn.fl.system.constant.SysLogConstant;
import cn.fl.system.service.ISysDictionaryService;
import cn.fl.system.service.ISysInsTabCfgService;
import cn.fl.system.service.ISysRegionService;
import cn.fl.system.service.ISysUsrService;
import cn.fl.system.vo.SysInsTabCfgVO;
import cn.fl.system.vo.SysUsrVO;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import fl.alipay.facade.api.IAlipayApiService;
import fl.customer.facade.customer.api.ICustomerModifyApiService;
import fl.customer.facade.customer.api.ICustomerQueryApiService;
import fl.customer.facade.customer.condition.CstNpBscInfoQueryCondition;
import fl.customer.facade.customer.condition.CstRlAttrQueryCondition;
import fl.customer.facade.customer.constant.CustomerConstant;
import fl.customer.facade.customer.dto.CstBscInfoDTO;
import fl.customer.facade.customer.dto.CstNpBscInfoDTO;
import fl.czbank.facade.api.ICzbankApi;
import fl.flow.facade.flow.api.IFlowQueryApiService;
import fl.flow.facade.flow.condition.SysFlowSHQueryCondition;
import fl.flow.facade.flow.constant.FlowConstant;
import fl.flow.facade.flow.dto.FlowStartParamsDTO;
import fl.flow.facade.flow.dto.SysFlowSHDTO;
import fl.inf.facade.api.ITransLogApi;
import fl.inf.facade.condition.InfTransLogQueryCondition;
import fl.inf.facade.dto.InfTransLogDTO;
import fl.spdbank.facade.api.ISpdbankApi;
import fl.spl.facade.spl.api.ISplHRiskWarnRecApiService;
import fl.spl.facade.spl.api.ISplInfoQueryApiService;
import fl.spl.facade.spl.condition.SplHRiskWarnRecQC;
import fl.spl.facade.spl.dto.SplHRiskWarnRecDTO;
import fl.tripartite.facade.api.ITripartiteApi;
import net.sf.json.JSONArray;
import org.apache.commons.collections.MapUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.*;

/**
 * 项目评审流程 控制层
 * @author yaoxiurong
 *
 */
@Controller
@RequestMapping("/project/audit")
public class PrjAuditFlowController extends BaseController {

	private static final Logger logger = LoggerFactory.getLogger(PrjAuditFlowController.class);

	/**
	 * 项目信息服务
	 */
	@Autowired
	private IPrjBscInfoService prjBscInfoService;
	
	@Autowired
	private IProjectApiService projectApiService;
	/**
	 * 项目产品信息服务
	 */
	@Autowired
	private IPrjPrdBscInfoService prjPrdBscInfoService;
	
	@Autowired
	private ICstRlAttrService cstRlAttrService;
	
	/**
	 * 信审维护产品信息服务
	 */
	@Autowired
	private IAudCarInfoService audCarInfoService;
	
	/**
	 * 信审整体资料服务
	 */
	@Autowired
	private IAudCreditInfoService audCreditInfoService;
	
	/**
	 * 项目评审流程信息服务
	 */
	@Autowired
	private IPrjAuditFlowService prjAuditFlowService;
	
	/**
	 * 代码映射服务
	 */
	@Autowired
	private ISysCdMapApiService sysCdMapApiService;
	
	/**
	 * 项目报价方案信息服务
	 */
	@Autowired
	private IPrjQuatPrpsService prjQuatPrpsService;
	
	/**
	 * 项目费用信息服务
	 */
	@Autowired
	private IPrjQuatPrpsFeeService prjQuatPrpsFeeService;
	
	/**
	 * 项目客户信息查询服务
	 */
	@Autowired
	private IPrjCstBscInfoService prjCstBscInfoService;

	@Autowired
	private IAuditStandingBookService auditStandingBookService;

	/**
	 * 客户查询服务
	 */
	@Autowired
	private ICstBscInfoService cstBscInfoService;
	
	/**
	 * 用户服务
	 */
	@Autowired
	private ISysUsrService sysUsrService;
	
	@Autowired
	private IAudReturnVisitService audReturnVisitService;
	
	@Autowired
	private IAudInterviewInfoService audInterviewInfoService;
	
	@Autowired
	private IAudStandingBookService audStandingBookService;
	
	/**
	 * 短信接口
	 */
	@Autowired
	private ISysSmsApiService sysSmsApiService;
	
	@Autowired
	private ICustomerQueryApiService customerQueryApiService;
	
	/**
	 * 车三百接口报告 服务层BEAN
	 */
	@Autowired
	private IInfCar300RecService infCar300RecService;
	
	/**
	 * 项目产品明细 服务层BEAN
	 */
	@Autowired
	private IPrjPrdDtlService prjPrdDtlService;
	
	/**
	 * 数据字典服务
	 */
	@Autowired
	private ISysDictionaryApiService sysDictionaryApiService;
	
//	@Autowired
//    private IIcbcApi icbcApi;
    
    @Autowired
    private ITransLogApi transLogApi;
    
    @Autowired
    private IPrjPrdPaySchMService prjPrdPaySchMService;
    
    @Autowired
    private ITripartiteApi tripartiteApi;
    
    @Autowired
    private ICzbankApi czbankApi;
    
    @Autowired
    private IAlipayApiService alipayApiService;
	@Autowired
	private ISysRegionService sysRegionService;

    @Autowired
    private IPrjCstAccInfoService prjCstAccInfoService;
    @Autowired
    private ISpdbankApi spdbankApi;
    
    @Autowired
    private ICapPayInfoService capPayInfoService; 
    
    @Autowired
    private ICacheService cacheService; 
    @Autowired
    private IRskCstSignLogService rskCstSignLogService; 
    
    @Autowired
    private IRskPrdSignLogService  rskPrdSignLogService; 
    
    @Autowired
    private ICustomerModifyApiService customerModifyApiService;

	@Autowired
	private ISysInsTabCfgService sysInsTabCfgService; // 资管机构模块配置

	/**
	 * 上牌
	 */
	@Autowired
	private IPrjPrdLicInfoService prjPrdLicInfoService;

	/**
	 * 抵押
	 */
	@Autowired
	private IPrjPrdMtgService prjPrdMtgService;

	@Autowired
	private ISplHRiskWarnRecApiService splHRiskWarnRecApiService;

	@Autowired
	private ICapChnOvdRateApiService capChnOvdRateApiService;
    @Autowired
    private IPrjPaySchMYqApiService prjPaySchMYqApiService;

	@Autowired
	private IFlowQueryApiService flowQueryApiService;

	@Autowired
	private IAuditOpeLineService auditOpeLineService;

	@Autowired
	private IExpBizManRecService expBizManRecService;

	@Autowired
	private IProprdLicenseService iProprdLicenseService;

	@Autowired
	private IPrjLnkCompService prjLnkCompService;

	/**
	 * 数据字典服务
	 */
	@Autowired
	private ISysDictionaryService sysDictionaryService;

	@Autowired
	private IPrjPreAudInfoApiService prjPreAudInfoService;

	@Autowired
	private IPrjPlcyIndexApiService prjPlcyIndexApiService;

	@Autowired
	private ISplInfoQueryApiService splInfoQueryApiService;

	@Autowired
	private IPrjSplBankAccRService prjSplBankAccRService;

	/**
	 * 到项目流程跟踪页面
	 * @param request
	 * @param response
	 * @return
	 */
	@RequestMapping(value = "/toProjectFlowPage.do", method = { RequestMethod.GET})
	public ModelAndView toProjectFlowPage(HttpServletRequest request, HttpServletResponse response) {
		String prjId = request.getParameter("prjId");
		String prjTypCd = request.getParameter("prjTypCd");
		ModelAndView view = new ModelAndView("project/prjbscinfo/projectFlowList");
		view.addObject("prjId", prjId);
		view.addObject("prjTypCd", prjTypCd);
		BaseLogUtils.info(logger, "toProjectFlowPage", "跳转到项目流程跟踪页面.", CurrentThreadContext.getCurrentUserName());
		return view;
	}
	
	/**
	 * 初始化项目流程跟踪列表
	 * @param request
	 * @param response
	 * @return
	 */
	@RequestMapping(value = "/initPorjectFlowList.do", method = { RequestMethod.GET})
	@ResponseBody
	public Object initPorjectFlowList(HttpServletRequest request, HttpServletResponse response) {
		String prjId = request.getParameter("prjId");//项目Id
		List<ProjectFlowSHVO> list = new ArrayList<ProjectFlowSHVO>();
		if(StringUtils.isNotEmpty(prjId)){
			list = this.prjAuditFlowService.searchProjectFlowList(Long.valueOf(prjId));
			for (ProjectFlowSHVO projectFlowSHVO : list) {
				if(StringUtils.isEmpty(projectFlowSHVO.getGrpFlag())){
					projectFlowSHVO.setGrpFlag("-");
				}
			}
			/*Collections.sort(list, new Comparator<ProjectFlowSHVO>(){
                public int compare(ProjectFlowSHVO o1, ProjectFlowSHVO o2) {  
                	if(o1.getBusTyp().length()>o2.getGrpFlag().length()){
                		return -1;
                	}
                	if(o1.getBusTyp().length()<o2.getGrpFlag().length()){
                		return 1;
                	}
            		return 0;
                }  
            });*/
			Collections.sort(list, new Comparator<ProjectFlowSHVO>(){
				public int compare(ProjectFlowSHVO o1, ProjectFlowSHVO o2) {  
					if(o1.getGrpFlag().compareTo(o2.getGrpFlag())!=0){
						return o1.getGrpFlag().compareTo(o2.getGrpFlag());
					}
					return o1.getBusTyp().compareTo(o2.getBusTyp());
				}  
			});
		}
		ListPageVO<ProjectFlowSHVO> listPage = new ListPageVO<ProjectFlowSHVO>(list, list.size());
		return listPage;
	}
	
	/**
	 * 验证挂靠
	 */
	@RequestMapping(value = "/lnkCompAud.do", method = { RequestMethod.POST})
	@ResponseBody
	public Object lnkCompAud(HttpServletRequest request, HttpServletResponse response) {
		String prjId = request.getParameter("prjId");//项目ID
		DataResultVO result = new DataResultVO(BaseConstant.IS_YESNO_YES, SysLogConstant.LOG_CMM_OPERATE_SUCC);
		if(StringUtils.isEmpty(prjId)){
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo(SysLogConstant.LOG_CMM_DATA_PK_IS_EMPTY);
			BaseLogUtils.info(logger, "addFlowStart", SysLogConstant.LOG_CMM_DATA_PK_IS_EMPTY, CurrentThreadContext.getCurrentUserName());
			return result;
		}
		try {
			PrjBscInfoQueryCondition qc = new PrjBscInfoQueryCondition();
			qc.setId(Long.valueOf(prjId));
			qc.setPrjTypCd(PrjBscInfoConstant.CODE_PRJ_TYP_CD_BILLING_CD);
			List<PrjBscInfoVO> voList = this.prjBscInfoService.searchPrjBscInfoList(qc);
			if(CollectionUtils.isNotEmpty(voList)){
				PrjPrdDtlQueryCondition prjPrdDtlQc = new PrjPrdDtlQueryCondition();
				prjPrdDtlQc.setPrjId(Long.valueOf(prjId));
				List<PrjPrdDtlVO> prjPrdDtlVOs = this.prjPrdDtlService.selectList(prjPrdDtlQc);
				if(CollectionUtils.isNotEmpty(prjPrdDtlVOs)){
					for(PrjPrdDtlVO prjPrdDtlVO :prjPrdDtlVOs){
					if(prjPrdDtlVO.getLnkCompId()!=null){
						result.setSuccess(BaseConstant.IS_YESNO_YES);
						result.setInfo("SUCCESS");
					}else{
						result.setSuccess(BaseConstant.IS_YESNO_NO);
						result.setInfo("请选择挂靠公司！");
						break;
					}
					}
				}else{
					result.setSuccess(BaseConstant.IS_YESNO_NO);
					result.setInfo("你选择的项目产品明细不存在！");
				}
			}else{
				result.setSuccess(BaseConstant.IS_YESNO_YES);
				result.setInfo("SUCCESS");
			}
		} catch (BaseException e) {
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo(e.getMessage());
			logger.info(e.getMessage());
		} catch (Exception e) {
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo("系统错误,请联系管理员！");
			logger.error("系统错误,请联系管理员！"+e.getMessage());
		}
		return result;
	}
	
	/**
	 * 启动流程
	 */
	@RequestMapping(value = "/addFlowStart.do", method = { RequestMethod.POST})
	@ResponseBody
	public Object addFlowStart(HttpServletRequest request, HttpServletResponse response) {
		String prjId = request.getParameter("prjId");//项目ID
		String procDefKey = request.getParameter("procDefKey");
		// 1.0 随州外派增加标识，起随州外派流程
		String flowTypeKey = request.getParameter("flowTypeKey");
		//是否录单员发起流程
		String isRecoderStartFlow = request.getParameter("isRecoderStartFlow");
		BaseLogUtils.newWebLogger("随州外派标识,prjId:" + prjId + ",procDefKey:" + procDefKey + ",flowTypeKey:" + flowTypeKey).info();
		// 同时发起垫款流程标识
		String startExpatriateFlow = request.getParameter("startExpatriateFlow");
		BaseLogUtils.newWebLogger("随州垫款流程标识,prjId:" + prjId + ",procDefKey:" + procDefKey + ",startExpatriateFlow:" + startExpatriateFlow).info();
		DataResultVO result = new DataResultVO(BaseConstant.IS_YESNO_YES, SysLogConstant.LOG_CMM_OPERATE_SUCC);
		if(StringUtils.isEmpty(prjId)){
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo(SysLogConstant.LOG_CMM_DATA_PK_IS_EMPTY);
			BaseLogUtils.info(logger, "addFlowStart", SysLogConstant.LOG_CMM_DATA_PK_IS_EMPTY, CurrentThreadContext.getCurrentUserName());
			return result;
		}
		FlowStartParamsDTO flowStartParamsDTO = new FlowStartParamsDTO();
		try {
			BaseLogUtils.info(logger, "addFlowStart", "发起流程=prjId:"+prjId, CurrentThreadContext.getCurrentUserName());
			//项目校验
			this.prjBscInfoService.searchRcCstBscInfoByPrjId(prjId);
			PrjBscInfoVO prjBscInfoVO = this.prjBscInfoService.selectById(Long.valueOf(prjId));
			/**
			 *  支付表重复历史校验方案（支付表号校验）
			 */
			BaseLogUtils.info(logger, "addFlowStart", "addFlowStart支付表重复校验Start=prjId:"+prjId);
			PrjPrdPaySchMQueryCondition  prjPrdPaySchMQueryCondition = new PrjPrdPaySchMQueryCondition();
			prjPrdPaySchMQueryCondition.setPrjId(Long.valueOf(prjId));
			prjPrdPaySchMQueryCondition.setIsAllBiz(BaseConstant.IS_YESNO_YES);
			List<PrjPrdPaySchMVO> prjPrdPaySchMVOS = this.prjPrdPaySchMService.searchList(prjPrdPaySchMQueryCondition);
			List<String> checkList = new ArrayList<String>();
			if(CollectionUtils.isNotEmpty(prjPrdPaySchMVOS)){
				for (PrjPrdPaySchMVO prjPrdPaySchMVO : prjPrdPaySchMVOS) {
					if(checkList.contains(prjPrdPaySchMVO.getPaySchNo())){
						BaseLogUtils.info(logger, "addFlowStart", "addFlowStart支付表重复校验prjId:"+prjId + "-重复-" + prjPrdPaySchMVO.getPaySchNo());
						throw new BaseException(BaseExceptionConstant.BASE_EXCEPTION_CODE_600, "项目支付表重复，请核实！");
					}else{
						checkList.add(prjPrdPaySchMVO.getPaySchNo());
					}
				}
			}
			BaseLogUtils.info(logger, "addFlowStart", "addFlowStart支付表重复校验end=prjId:"+prjId);
			/**
			 * 非资管业务机构清除 临时方案
			 */
			if(BaseConstant.IS_YESNO_NO == prjBscInfoVO.getIsInsBiz()){
				if(StringUtils.isNotEmpty(prjBscInfoVO.getFundRasInsId())|| StringUtils.isNotBlank(prjBscInfoVO.getFundRasInsNm())|| StringUtils.isNotBlank(prjBscInfoVO.getInsCode())){
					BaseLogUtils.info(logger, "addFlowStart", "addFlowStart修改项目信息Start=prjId:"+prjId+",prjBscInfoVO:"+JSON.toJSONString(prjBscInfoVO));
					prjBscInfoVO.setFundRasInsId(null);
					prjBscInfoVO.setFundRasInsNm(null);
					prjBscInfoVO.setInsCode(null);
					int mdfprj = this.prjBscInfoService.updateFundPrjBscInfo(prjBscInfoVO);
					BaseLogUtils.info(logger, "addFlowStart", "addFlowStart修改项目信息End=prjId:"+prjId+",mdfprj:"+mdfprj);
				}
			}
			String buOrgCd = prjBscInfoVO.getBuOrgCd();
			String prjTypCd = prjBscInfoVO.getPrjTypCd();
			PrjPrdDtlQueryCondition prjPrdDtlQc = new PrjPrdDtlQueryCondition();
			prjPrdDtlQc.setPrjId(Long.valueOf(prjId));
			List<PrjPrdDtlVO> prjPrdDtlVOS = this.prjPrdDtlService.selectList(prjPrdDtlQc);
			BaseLogUtils.info(logger,"addFlowStart","addFlowStart.prjPrdDtlVOS=" + JSON.toJSONString(prjPrdDtlVOS));
			//重卡新车 判断挂靠公司是否一致
			if(PrjBscInfoConstant.CODE_BU_ORG_CD_ZK.equals(buOrgCd) && (PrjBscInfoConstant.PRJ_TYP_CD_CPYW.equals(prjTypCd) || PrjBscInfoConstant.PRJ_TYP_CD_CTYW.equals(prjTypCd))){
				//REQ-14961 判断当前时间经销商代偿担保合同生效状态是否有效，若失效则无法发起流程，提示【经销商代偿担保合同已失效，无法发起渠道代偿担保业务】
				PrjPrdBscInfoQueryCondition prdBscQc = new PrjPrdBscInfoQueryCondition();
				prdBscQc.setPrjId(Long.valueOf(prjId));
				List<PrjPrdBscInfoVO> prjPrdList = this.prjPrdBscInfoService.searchList(prdBscQc);
				PrjPrdBscInfoVO prjPrdBscInfoVO = prjPrdList.get(prjPrdList.size() - 1);
				if("1".equals(prjBscInfoVO.getCompensatoryType())){
					boolean flag = splInfoQueryApiService.checkSplCarsGuarIsValid(prjPrdBscInfoVO.getSplId());
					if(!flag){
						throw new BaseException("经销商代偿担保合同已失效，无法发起渠道代偿担保业务!");
					}
					//遍历车有没有代偿担保支付账号信息
					List<Long> prjPrdIdList = new ArrayList<Long>();
					for (PrjPrdBscInfoVO prd : prjPrdList) {
						prjPrdIdList.add(prd.getId());
					}
					PrjSplBankAccRQueryCondition compensatoryBankQc =  new PrjSplBankAccRQueryCondition();
					compensatoryBankQc.setPrjPrdIds(prjPrdIdList);
					if(prjPrdBscInfoVO.getGuaranteePaymentType().equals(PrjPrdBscInfoConstant.GUARANTEE_PAYMENT_TYPE_01)){
						compensatoryBankQc.setPurpCd(PrjPrdBscInfoConstant.COMPENSATORY_BANK_NO_TYP);
					}else{
						compensatoryBankQc.setPurpCd(PrjPrdBscInfoConstant.LNKCOMP_COMPENSATORY_BANK_NO_TYP);
					}
					List<PrjSplBankAccRVO> compensatoryBankList = this.prjSplBankAccRService.searchList(compensatoryBankQc);
					if(CollectionUtils.isEmpty(compensatoryBankList) || compensatoryBankList.size() != prjPrdList.size()){
						throw new BaseException("请先维护代偿担保支付账号！");
					}
				}
				if("2".equals(prjBscInfoVO.getCompensatoryType())){
					//遍历车有没有代偿担保支付账号信息
					List<Long> prjPrdIdList = new ArrayList<Long>();
					for (PrjPrdBscInfoVO prd : prjPrdList) {
						prjPrdIdList.add(prd.getId());
					}
					PrjSplBankAccRQueryCondition depositBankQc =  new PrjSplBankAccRQueryCondition();
					depositBankQc.setPrjPrdIds(prjPrdIdList);
					if(prjPrdBscInfoVO.getGuaranteePaymentType().equals(PrjPrdBscInfoConstant.GUARANTEE_PAYMENT_TYPE_01)){
						depositBankQc.setPurpCd(PrjPrdBscInfoConstant.SPL_DEPOSIT_BANK_NO_TYP);
					}else{
						depositBankQc.setPurpCd(PrjPrdBscInfoConstant.LNKCOMP_DEPOSIT_BANK_NO_TYP);
					}
					List<PrjSplBankAccRVO> compensatoryBankList = this.prjSplBankAccRService.searchList(depositBankQc);
					if(CollectionUtils.isEmpty(compensatoryBankList) || compensatoryBankList.size() != prjPrdList.size()){
						throw new BaseException("请先维护保证金担保支付账号！");
					}
				}
				if(CollectionUtils.isNotEmpty(prjPrdDtlVOS)) {
					PrjPrdDtlVO prjPrdDtlVo = prjPrdDtlVOS.get(0);
					Long lnkCompId = prjPrdDtlVo.getLnkCompId();
					String lnkCompType = prjPrdDtlVo.getLnkCompType();
					if (StringUtils.isNotEmpty(lnkCompId)) {
						for (PrjPrdDtlVO prjPrdDtlVO : prjPrdDtlVOS) {
							if (StringUtils.isNotEmpty(lnkCompId)) {
								if (!(lnkCompId.equals(prjPrdDtlVO.getLnkCompId()))) {
									throw new BaseException("挂靠公司不一致");
								}
							} else {
								if (StringUtils.isNotEmpty(prjPrdDtlVO.getLnkCompId())) {
									throw new BaseException("挂靠公司不一致");
								}
							}
						}
					}
					if (StringUtils.isNotEmpty(lnkCompType)) {
						for (PrjPrdDtlVO prjPrdDtlVO : prjPrdDtlVOS) {
							if (StringUtils.isNotEmpty(lnkCompType)) {
								if (!(lnkCompType.equals(prjPrdDtlVO.getLnkCompType()))) {
									throw new BaseException("挂靠公司类型不一致");
								}
							} else {
								if (StringUtils.isNotEmpty(prjPrdDtlVO.getLnkCompType())) {
									throw new BaseException("挂靠公司类型不一致");
								}
							}
						}
					}
				}
			}
			/**
			 * 车抵贷线下 二手车交易贷 必须保证挂靠公司都为空 或者挂靠公司相同
			 */
			if(PrjBscInfoConstant.PRJ_TYP_CD_CDDYWUL.equals(prjTypCd) || PrjBscInfoConstant.PRJ_TYP_CD_ESCJYD.equals(prjTypCd) || PrjBscInfoConstant.PRJ_TYP_CD_OWNJYD.equals(prjTypCd)){
				if(CollectionUtils.isNotEmpty(prjPrdDtlVOS)){
					PrjPrdDtlVO prjPrdDtlVo = prjPrdDtlVOS.get(0);
					Long lnkCompId = prjPrdDtlVo.getLnkCompId();
					if(StringUtils.isNotEmpty(lnkCompId)){
						for (PrjPrdDtlVO prjPrdDtlVO : prjPrdDtlVOS) {
							if(StringUtils.isNotEmpty(lnkCompId)){
								if(!(lnkCompId.equals(prjPrdDtlVO.getLnkCompId()))){
									throw new BaseException("挂靠公司不一致");
								}
							}else{
								if(StringUtils.isNotEmpty(prjPrdDtlVO.getLnkCompId())){
									throw new BaseException("挂靠公司不一致");
								}
							}
						}
					}else{
						if(PrjBscInfoConstant.PRJ_TYP_CD_CDDYWUL.equals(prjTypCd)){
							List idList = new ArrayList<Long>();
							for (PrjPrdDtlVO prjPrdDtlVO : prjPrdDtlVOS) {
								idList.add(prjPrdDtlVO.getId());
							}
							//征信有绑定的挂靠 必须维护挂靠
							GetPrjPrdLicInfoListRequest getPrjPrdLicInfoListRequest = new GetPrjPrdLicInfoListRequest();
							getPrjPrdLicInfoListRequest.setSysCd(CurrentThreadContext.getCurrentSysCd());
							getPrjPrdLicInfoListRequest.setOrgCd(CurrentThreadContext.getCurrentOrgCd());
							cn.fl.preloan.condition.PrjPrdLicInfoQueryCondition prdLicInfoQueryCondition = new cn.fl.preloan.condition.PrjPrdLicInfoQueryCondition();
							prdLicInfoQueryCondition.setIdList(idList);
							getPrjPrdLicInfoListRequest.setCondition(prdLicInfoQueryCondition);
							BaseLogUtils.info(logger,"addFlowStart","发起流程上牌数据查询参数：" + JSON.toJSONString(getPrjPrdLicInfoListRequest));
							ResponseData<GetPrjPrdLicInfoListResponseDTO> getPrjPrdLicInfoListResponse = this.iProprdLicenseService.searchList(getPrjPrdLicInfoListRequest);
							BaseLogUtils.info(logger,"addFlowStart","发起流程上牌数据查询结果：" + JSON.toJSONString(getPrjPrdLicInfoListResponse));
							List<cn.fl.preloan.dto.PrjPrdLicInfoDTO> licInfoDTOS = getPrjPrdLicInfoListResponse.getData().getPrjPrdLicInfoDTOS();
							if(CollectionUtils.isEmpty(licInfoDTOS) || licInfoDTOS.size() != prjPrdDtlVOS.size()){
								throw new BaseException("车牌号查询异常");
							}else{
								for (cn.fl.preloan.dto.PrjPrdLicInfoDTO prjPrdLicInfoDTO : licInfoDTOS) {
									String vehNo = prjPrdLicInfoDTO.getVehNo();
									if(StringUtils.isBlank(vehNo)){
										throw new BaseException("车牌号查询异常");
									}
									DataResultDTO resultDTO = this.prjLnkCompService.selectRiskLnkList(Long.valueOf(prjId), vehNo, null);
									if(resultDTO != null){
										String code = resultDTO.getCode();
										if(BaseConstant.IS_YESNO_NO_STR.equals(code)){
											throw new BaseException("请维护项目车辆的挂靠公司");
										}
									}
								}
							}
						}else{
							DataResultDTO resultDTO = this.prjLnkCompService.selectRiskLnkList(Long.valueOf(prjId), null, null);
							if(resultDTO != null){
								String code = resultDTO.getCode();
								if(BaseConstant.IS_YESNO_NO_STR.equals(code)){
									throw new BaseException("请维护项目车辆的挂靠公司");
								}
							}
						}
					}
				}
			}

			flowStartParamsDTO.setAudStsCd(FlowConstant.FLOW_CHECK_STATE_IN);
			flowStartParamsDTO.setWordsInTheTable(PrjBscInfoConstant.PRJ_FLOW_S_H_PRJ);
			flowStartParamsDTO.setProcDefKey(procDefKey);
			//flowStartParamsDTO.setProcDefId(procDefId);
			//flowStartParamsDTO.setProcNo(procNo);
			flowStartParamsDTO.setCrtUsrId(prjBscInfoVO.getCstMgrId());
			flowStartParamsDTO.setBusinessKey(prjId);
			flowStartParamsDTO.setOrgCd(prjBscInfoVO.getCstMgrOrgCd());
			flowStartParamsDTO.setSysCd(CurrentThreadContext.getFlServiceSysCd());
			flowStartParamsDTO.setBuOrgCd(prjBscInfoVO.getBuOrgCd());
			flowStartParamsDTO.setInitiator(String.valueOf(prjBscInfoVO.getCstMgrId()));
			flowStartParamsDTO.setInitiatorNm(prjBscInfoVO.getCstMgrNm());
			flowStartParamsDTO.setProcPriority(FlowConstant.FLOW_PRIORITY_EMERGENCY);
			flowStartParamsDTO.setBusinessType(FlowConstant.FLOW_BUSINESS_TYP_PRJ_BSC_INFO);
			flowStartParamsDTO.setModelTyp(FlowConstant.FLOW_MODEL_TYP_PRJ_1);
			if (StringUtils.isNotEmpty(flowTypeKey) && "1".equals(flowTypeKey)) {
				flowStartParamsDTO.setModelTyp(PrjBscInfoConstant.EXP_BIZ_FLOW);
				flowStartParamsDTO.setIsFlowStatePassCanbeStart(true);//流程审核通过状态是否可以发起流程
				//设置关键字
				this.setProductKeywords(flowStartParamsDTO, prjBscInfoVO);
			}
			flowStartParamsDTO.setSchr1(flowTypeKey);
			flowStartParamsDTO.setSchr2(startExpatriateFlow);
			HashMap<String, Object> param = new HashMap<>();
			if (StringUtils.isNotEmpty(isRecoderStartFlow)){
				param.put("isRecoderStartFlow",isRecoderStartFlow);
			} else {
				param.put("isRecoderStartFlow","0");
			}
			flowStartParamsDTO.setStartParams(param);
			BaseLogUtils.newLogger("发起流程参数，prjId:{},flowStartParamsDTO:{}",prjId, JSON.toJSONString(flowStartParamsDTO)).info();
			result = this.prjAuditFlowService.addFlowStart(result, flowStartParamsDTO);
			//REQ-8489 拆分资管机构需求【一期】
			if(result.getSuccess()==BaseConstant.IS_YESNO_YES){
				PrjBscInfoDTO prjBscInfoDTO = this.projectApiService.selectById(Long.valueOf(prjId));
				if(StringUtils.isNotEmpty(prjBscInfoDTO.getPreRouteId())){
					Long preRouteId = prjBscInfoDTO.getPreRouteId();
					PrjBscInfoQueryCondition pbiqc = new PrjBscInfoQueryCondition();
					pbiqc.setPreRouteId(preRouteId);
					List<PrjBscInfoDTO> pbidtolist = this.projectApiService.searchPrePrjBscInfoList(pbiqc);
					if(CollectionUtils.isNotEmpty(pbidtolist)){
						StringBuffer insNms = new StringBuffer("");
						for (PrjBscInfoDTO pbidto : pbidtolist){
							if(StringUtils.isEmpty(pbidto.getId())||StringUtils.isEmpty(pbidto.getpNo())){
								if(insNms.length()>0){
									insNms.append(",");
								}
								insNms.append(pbidto.getFundRasInsNm());
							}
						}
						if(insNms.length()>0){
							StringBuffer preRouteTips = new StringBuffer("当前项目对应的筛选记录：");
							preRouteTips.append(preRouteId);
							preRouteTips.append("，尚有");
							preRouteTips.append(insNms);
							preRouteTips.append("机构没有发起评审流程，请尽快发起.");
							result.setInfo(preRouteTips.toString()+result.getInfo());
						}
					}
				}
			}
		} catch (BaseException e) {
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo(e.getMessage());
			BaseLogUtils.info(logger, "addFlowStart", "发起流程异常=prjId:"+prjId, CurrentThreadContext.getCurrentUserName(),e);
		} catch (Exception e) {
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo("系统错误,请联系管理员！");
			BaseLogUtils.info(logger, "addFlowStart", "发起流程异常=prjId:"+prjId, CurrentThreadContext.getCurrentUserName(),e);
		}
		return result;
	}


	/**
	 * 发起预审
	 */
	@RequestMapping(value = "/addPreAudFlowStart.do", method = { RequestMethod.POST})
	@ResponseBody
	public Object addPreAudFlowStart(HttpServletRequest request, HttpServletResponse response) {
		BaseLogUtils.newLogger("发起预审流程：params:{}" + JSONObject.toJSONString(request.getParameterMap())).info();
		String prjId = request.getParameter("prjId");//项目ID
		String procDefKey = request.getParameter("procDefKey");
		DataResultVO result = new DataResultVO(BaseConstant.IS_YESNO_YES, SysLogConstant.LOG_CMM_OPERATE_SUCC);
		if(StringUtils.isEmpty(prjId)){
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo(SysLogConstant.LOG_CMM_DATA_PK_IS_EMPTY);
			return result;
		}
		FlowStartParamsDTO flowStartParamsDTO = new FlowStartParamsDTO();
		try {
			PrjBscInfoVO prjBscInfoVO = this.prjBscInfoService.selectById(Long.valueOf(prjId));
			BaseLogUtils.newLogger("发起预审流程.查询项目信息prjId：{}，prjBscInfoVO:{}", prjId, JSONObject.toJSONString(prjBscInfoVO)).info();
			this.prjBscInfoService.checkPreAudInfo(Long.valueOf(prjId),prjBscInfoVO.getCstId());
			BaseLogUtils.newLogger("发起预审流程.预审校验通过prjId:{}", prjId ).info();

			flowStartParamsDTO.setAudStsCd(FlowConstant.FLOW_CHECK_STATE_PRE_IN);
			flowStartParamsDTO.setWordsInTheTable(PrjBscInfoConstant.PRJ_FLOW_S_H_PRJ);
			flowStartParamsDTO.setProcDefKey(procDefKey);
			flowStartParamsDTO.setCrtUsrId(prjBscInfoVO.getCstMgrId());
			flowStartParamsDTO.setBusinessKey(prjId);
			flowStartParamsDTO.setOrgCd(prjBscInfoVO.getCstMgrOrgCd());
			flowStartParamsDTO.setSysCd(CurrentThreadContext.getFlServiceSysCd());
			flowStartParamsDTO.setBuOrgCd(prjBscInfoVO.getBuOrgCd());
			flowStartParamsDTO.setInitiator(String.valueOf(prjBscInfoVO.getCstMgrId()));
			flowStartParamsDTO.setInitiatorNm(prjBscInfoVO.getCstMgrNm());
			flowStartParamsDTO.setProcPriority(FlowConstant.FLOW_PRIORITY_EMERGENCY);
			flowStartParamsDTO.setBusinessType(FlowConstant.FLOW_BUSINESS_TYP_PRJ_BSC_INFO);
			flowStartParamsDTO.setModelTyp(FlowConstant.FLOW_MODEL_TYP_PRJ_1);

			BaseLogUtils.newLogger("发起预审流程.prjId:{},flowStartParamsDTO:{}", prjId, JSONObject.toJSONString(flowStartParamsDTO) ).info();
			result = this.prjAuditFlowService.addPreAudFlowStart(result, flowStartParamsDTO);
			BaseLogUtils.newLogger("发起预审流程End.prjId:{},result:{}", prjId, JSONObject.toJSONString(result) ).info();
			if(result.getSuccess()==BaseConstant.IS_YESNO_YES){
				//发起流程成功后，修改prj_pre_aud_info.pre_aud_status为"7"
				ResponseData<Integer> responseData = prjPreAudInfoService.modifyPreAudStatusByPrjId(Long.valueOf(prjId), FlowConstant.FLOW_CHECK_STATE_KNOW);
				BaseLogUtils.newLogger("更新预审审核状态End.prjId:{},responseData:{}", prjId, JSONObject.toJSONString(responseData) ).info();
				if (!responseData.getCode().equals(ResponseData.SUCCESS_CODE)){
					result.setSuccess(BaseConstant.IS_YESNO_NO);
					result.setInfo("更新预审审核状态失败！");
				}
				//REQ-8489 拆分资管机构需求【一期】
				PrjBscInfoDTO prjBscInfoDTO = this.projectApiService.selectById(Long.valueOf(prjId));
				if(StringUtils.isNotEmpty(prjBscInfoDTO.getPreRouteId())){
					Long preRouteId = prjBscInfoDTO.getPreRouteId();
					PrjBscInfoQueryCondition pbiqc = new PrjBscInfoQueryCondition();
					pbiqc.setPreRouteId(preRouteId);
					List<PrjBscInfoDTO> pbidtolist = this.projectApiService.searchPrePrjBscInfoList(pbiqc);
					if(CollectionUtils.isNotEmpty(pbidtolist)){
						StringBuffer insNms = new StringBuffer("");
						for (PrjBscInfoDTO pbidto : pbidtolist){
							if(StringUtils.isEmpty(pbidto.getId())||StringUtils.isEmpty(pbidto.getpNo())){
								if(insNms.length()>0){
									insNms.append(",");
								}
								insNms.append(pbidto.getFundRasInsNm());
							}
						}
						if(insNms.length()>0){
							StringBuffer preRouteTips = new StringBuffer("当前项目对应的筛选记录：");
							preRouteTips.append(preRouteId);
							preRouteTips.append("，尚有");
							preRouteTips.append(insNms);
							preRouteTips.append("机构没有发起评审流程，请尽快发起.");
							result.setInfo(preRouteTips.toString()+result.getInfo());
						}
					}
				}
			}
		} catch (BaseException e) {
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo(e.getMessage());
			BaseLogUtils.newLogger("addPreAudFlowStart.发起流程异常=prjId:{},e:{}",prjId,e).info();
			return result;
		} catch (Exception e) {
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo("系统错误,请联系管理员！");
			BaseLogUtils.newLogger("addPreAudFlowStart.发起流程异常=prjId:"+prjId, e).info();
			return result;
		}
		return result;
	}
	
	/**
	 * 初始化 项目客户担保人列表
	 * @param request
	 * @param response
	 * @return
	 */
	@SuppressWarnings("unchecked")
	@RequestMapping(value = "/initGuarantorList.do", method = { RequestMethod.GET})
	@ResponseBody
	public Object initGuarantorList(HttpServletRequest request, HttpServletResponse response) {
		String currentPage = request.getParameter("page");
		String pageSize = request.getParameter("pagesize");
		String cstRlTyp = request.getParameter("cstRlTyp");//客户属性
		String prjId = request.getParameter("prjId");//项目Id
		prjId =	prjBscInfoService.getPrjIdByPrjId(prjId);
        Pager page = new Pager();
		if (StringUtils.isNotEmpty(currentPage)) {
			page.setCurrentPage(Integer.parseInt(currentPage));
		}

		if (StringUtils.isNotEmpty(currentPage)) {
			page.setEveryPage(Integer.parseInt(pageSize));
		}

		PrjCstBscInfoQueryCondition qc = new PrjCstBscInfoQueryCondition();
		/*if (StringUtils.isNotEmpty(cstNm)) {
			qc.setCstNm(cstNm);
		}
		if (StringUtils.isNotEmpty(cstTypCd)) {
			qc.setCstTypCd(cstTypCd);
		}*/
		if (StringUtils.isNotEmpty(cstRlTyp)) {
			qc.setCstRlTyp(cstRlTyp);
		}
		if(StringUtils.isNotBlank(prjId)){
			qc.setPrjId(Long.valueOf(prjId));
		}
		page.setCondition(qc);

		Pager pager = this.prjCstBscInfoService.searchListPage(page);
		List<PrjCstBscInfoVO> list = (List<PrjCstBscInfoVO>) pager.getResultList();

		List<CstBscInfoVO> cstBscInfoVOList = new ArrayList<CstBscInfoVO>();
		if(CollectionUtils.isNotEmpty(list)){
			for (PrjCstBscInfoVO prjCstBscInfoVO : list) {
				CstBscInfoVO cstBscInfoVO = this.cstBscInfoService.selectDetailById(prjCstBscInfoVO.getCstId());
				cstBscInfoVOList.add(cstBscInfoVO);
			}
		}
		
		ListPageVO<CstBscInfoVO> listPage = new ListPageVO<CstBscInfoVO>(cstBscInfoVOList, pager.getTotalCount());
		BaseLogUtils.info(logger, "initList", "查询数据完成. DATA:" + JSONObject.toJSONString(page), CurrentThreadContext.getCurrentUserName());
		return listPage;
	}
	
	/**
	 * 初始化项目产品查看列表
	 */
	@SuppressWarnings("unchecked")
	@RequestMapping(value = "/initPrjPrdList.do", method = { RequestMethod.GET})
	@ResponseBody
	public Object initPrjPrdList(HttpServletRequest request, HttpServletResponse response) {
		String currentPage = request.getParameter("page");
		String pageSize = request.getParameter("pagesize");
		String prjId = request.getParameter("prjId");//项目ID
		String proIntId = request.getParameter("proIntId");//流程实例ID
		try {
			if(StringUtils.isEmpty(prjId)){
				BaseLogUtils.info(logger, "initPrjPrdList", "初始化项目产品列表,项目ID不能为空.projectId:"+prjId, CurrentThreadContext.getCurrentUserName());
				return null;
			}
			String audPrjPrdListFlag = request.getParameter("audPrjPrdListFlag");//流程附加信息页面 不同大类产品列表标识
			if(StringUtils.isEmpty(audPrjPrdListFlag)){
				BaseLogUtils.info(logger, "initPrjPrdList", "初始化项目产品列表,产品列表标识不能为空.audPrjPrdListFlag:"+audPrjPrdListFlag, CurrentThreadContext.getCurrentUserName());
				return null;
			}
			//查询映射表 找到匹配一级产品类型 设置到查询条件里   :查询是用  prdTypCd like 'XX%' 
			SysCdMapDQueryCondition cdMapDQC = new SysCdMapDQueryCondition();
			cdMapDQC.setSysCd(CurrentThreadContext.getCurrentSysCd());
			cdMapDQC.setOrgCd(CurrentThreadContext.getCurrentOrgCd());
			cdMapDQC.setmTypCd("M2006");
			List<SysCdMapDDTO> sysCdMapDList = this.sysCdMapApiService.searchSysCdMapDWithTargetList(cdMapDQC);
			List<String> prdTypCdList = new ArrayList<String>();
			if(CollectionUtils.isNotEmpty(sysCdMapDList)){
				for (SysCdMapDDTO sysCdMapDDTO : sysCdMapDList) {
					if(audPrjPrdListFlag.equals(sysCdMapDDTO.getTCode())){
						prdTypCdList.add(sysCdMapDDTO.getSCode());
					}
				}
			}else{
				BaseLogUtils.info(logger, "initPrjPrdList", "初始化项目产品列表,查询产品类型映射结果为空.cdMapDQC:"+cdMapDQC+",sysCdMapDList:"+JSON.toJSONString(sysCdMapDList), CurrentThreadContext.getCurrentUserName());
				return null;
			}
			Pager page = new Pager();
			if (StringUtils.isNotEmpty(currentPage)) {
				page.setCurrentPage(Integer.parseInt(currentPage));
			}
			if (StringUtils.isNotEmpty(currentPage)) {
				page.setEveryPage(Integer.parseInt(pageSize));
			}

			PrjPrdBscInfoQueryCondition qc = new PrjPrdBscInfoQueryCondition();
			if(StringUtils.isNotBlank(prjId)){
				qc.setPrjId(Long.valueOf(prjId));
			}
			if(CollectionUtils.isNotEmpty(prdTypCdList)){
				qc.setPrdTypCdList(prdTypCdList);
			}
			page.setCondition(qc);

			BaseLogUtils.info(logger, "initPrjPrdList", "===查询项目产品信息Start===page:"+JSON.toJSONString(page), CurrentThreadContext.getCurrentUserName());
			Pager pager = this.prjPrdBscInfoService.searchListPage(page);
			BaseLogUtils.info(logger, "initPrjPrdList", "===查询项目产品信息End===pager:"+JSON.toJSONString(pager), CurrentThreadContext.getCurrentUserName());
			List<PrjPrdBscInfoVO> list = (List<PrjPrdBscInfoVO>) pager.getResultList();

			if(CollectionUtils.isNotEmpty(list)){
				List<KeyValueVO> payWayCdList = this.prjBscInfoService.searchPayWayCdList(CurrentThreadContext.getCurrentSysCd(), "0000");
				//产品留购价*产品数量 设置为留购价
				for (PrjPrdBscInfoVO prjPrdBscInfoVO : list) {
					for(KeyValueVO keyValueVO : payWayCdList){
						if(StringUtils.isNotEmpty(prjPrdBscInfoVO.getPayWayCd())&&prjPrdBscInfoVO.getPayWayCd().equals(keyValueVO.getKey())){
							prjPrdBscInfoVO.setPayWayCdNm(keyValueVO.getValue());
							break;
						}
					}
					Double rsrvPc = prjPrdBscInfoVO.getRsrvPc();
					Integer prdQty = prjPrdBscInfoVO.getPrdQty();
					if(null!=rsrvPc && null!=prdQty){
						double purchaseFeeAmtSum = DecimalUtils.mul(rsrvPc, Double.valueOf(String.valueOf(prdQty)));
						prjPrdBscInfoVO.setPurchaseFeeAmtSum(purchaseFeeAmtSum);
					}
				}
			}
			
			
			/**
			 * 查询项目方案留购价费用
			 */
			/*PrjQuatPrpsQueryCondition quatQC = new PrjQuatPrpsQueryCondition();
			quatQC.setIsFormalPrps(BaseConstant.IS_YESNO_YES);
			quatQC.setPrjId(Long.valueOf(prjId));
			List<PrjQuatPrpsVO> quatList = this.prjQuatPrpsService.searchList(quatQC);
			if(CollectionUtils.isNotEmpty(quatList)){
				PrjQuatPrpsVO prjQuatPrpsVO = quatList.get(0);
				if(null!=prjQuatPrpsVO && null!=prjQuatPrpsVO.getId()){
					*//**根据项目报价方案ID查询报价方案基础费用信息*//*
					PrjQuatPrpsFeeQueryCondition feeQc = new PrjQuatPrpsFeeQueryCondition();
					feeQc.setPrpsId(prjQuatPrpsVO.getId());
					List<PrjQuatPrpsFeeVO> feeList = this.prjQuatPrpsFeeService.searchList(feeQc);
					if(CollectionUtils.isNotEmpty(feeList)){
						Double purchaseFeeAmt = null;
						for (PrjQuatPrpsFeeVO prjQuatPrpsFeeVO : feeList) {
							if(prjQuatPrpsFeeVO.getFeeTypCd().equals(PrjQuatPrpsFeeConstant.PRJ_FEE_TYP_PURCHASE)){//留购价(总)
								purchaseFeeAmt = prjQuatPrpsFeeVO.getFeeAmt();
								break;
							}
						}
						if(null!=purchaseFeeAmt && CollectionUtils.isNotEmpty(list)){
							for (PrjPrdBscInfoVO prjPrdBscInfoVO : list) {
								Integer prdQty = prjPrdBscInfoVO.getPrdQty();
								if(null!=prdQty){
									double purchaseFeeAmtSum = DecimalUtils.mul(purchaseFeeAmt, Double.valueOf(String.valueOf(prdQty)));
									prjPrdBscInfoVO.setPurchaseFeeAmtSum(Double.valueOf(DecimalUtils.div(purchaseFeeAmtSum, 100)));
								}
							}
						}
					}
				}
			}*/
			
			
			//加入信审维护产品信息
			if(CollectionUtils.isNotEmpty(list)){
				//为防止页面产品列表报audCarInfoVO null 异常 先都设为空对象
				for (PrjPrdBscInfoVO prjPrdBscInfoVO : list) {
					prjPrdBscInfoVO.setAudCarInfoVO(new AudCarInfoVO());
				}
				//查询信审资料表
				if(StringUtils.isNotEmpty(proIntId)){
					AuditCreditInfoQueryCondition creditQC = new AuditCreditInfoQueryCondition();
					creditQC.setProIntId(proIntId);
					creditQC.setProjectId(Long.valueOf(prjId));
					AudCreditInfoVO audCreditInfoVO = this.audCreditInfoService.selectAudCreditInfoByQc(creditQC);
					BaseLogUtils.newLogger("查询信审资料数据audCreditInfoVO=" + JSON.toJSONString(audCreditInfoVO)).info();
					if (audCreditInfoVO != null && audCreditInfoVO.getId() != null) {
						Long creditInfoId = audCreditInfoVO.getId();
						if (null != creditInfoId) {
							List<Long> prjPrdIdList = new ArrayList<Long>();
							for (PrjPrdBscInfoVO prjPrdBscInfoVO : list) {
								prjPrdIdList.add(prjPrdBscInfoVO.getId());
							}
							AuditCarInfoQueryCondition condition = new AuditCarInfoQueryCondition();
							condition.setPrjPrdIdList(prjPrdIdList);
							condition.setCreditInfoId(creditInfoId);
							List<AudCarInfoVO> audCarInfoVOList = this.audCarInfoService.searchList(condition);
							if (CollectionUtils.isNotEmpty(audCarInfoVOList)) {
								for (AudCarInfoVO audCarInfoVO : audCarInfoVOList) {
									for (PrjPrdBscInfoVO prjPrdBscInfoVO : list) {
										if (prjPrdBscInfoVO.getId().equals(audCarInfoVO.getPrjPrdId())) {
											prjPrdBscInfoVO.setAudCarInfoVO(audCarInfoVO);
										}
									}
								}
							}
						}
					}
				}
			}
			String car300 = request.getParameter("car300");
			if(StringUtils.isNotEmpty(car300) && String.valueOf(BaseConstant.IS_YESNO_YES).equals(car300)){
				//加入车三百接口返回的产品信息
				if(CollectionUtils.isNotEmpty(list)){
					//循环产品列表-设置对应的产品报告信息
					for (PrjPrdBscInfoVO prjPrdBscInfoVO : list) {
						if(null!=prjPrdBscInfoVO){
							//为防止页面产品列表报infCar300RecVO null 异常 先都设为空对象
							prjPrdBscInfoVO.setInfCar300RecVO(new InfCar300RecVO());
							//只有旧车才有报告-先进行判断
							if(null!=prjPrdBscInfoVO.getIsNew() && prjPrdBscInfoVO.getIsNew() == 0){
								//根据项目ID查询产品明细列表信息
								PrjPrdDtlQueryCondition condition = new PrjPrdDtlQueryCondition();
								condition.setPrjId(Long.parseLong(prjId));
								condition.setPrjPrdId(prjPrdBscInfoVO.getId());
								List<PrjPrdDtlVO> plist = this.prjPrdDtlService.selectList(condition);
								//循环生成，按项目查询设备
								List<InfCar300RecVO> reList = new ArrayList<InfCar300RecVO>();
								InfCar300RecQueryCondition recQc = new InfCar300RecQueryCondition();
								if(CollectionUtils.isNotEmpty(plist) && plist.size()>0){
									for(PrjPrdDtlVO vo : plist){
										//VIN作为唯一值如果空-则跳过
										if (StringUtils.isEmpty(vo.getVin())) {
											continue;
										}
										//查询数据库-取第一条数据(按报告日期排序-取最新的)
										recQc.setVin(vo.getVin());
										List<InfCar300RecVO> vinList = this.infCar300RecService.searchList(recQc);
										if(CollectionUtils.isNotEmpty(vinList) && vinList.size()>0){
											InfCar300RecVO recVo = vinList.get(0);
											if(recVo.getAccidentType() == null || "null".equals(recVo.getAccidentType())){
												recVo.setAccidentType("否");
											}else{
												recVo.setAccidentType("是");
											}
											reList.add(recVo);
										}
									}
								}
								//设置相应的车辆报告信息
								if(CollectionUtils.isNotEmpty(reList) && reList.size()>0){
									prjPrdBscInfoVO.setInfCar300RecVO(reList.get(0));
									AudCarInfoVO audVO = prjPrdBscInfoVO.getAudCarInfoVO();
									if(null == audVO.getRegisteDate()){
										String regDate = reList.get(0).getRegDate().replaceFirst("-0", "-");
										audVO.setRegisteDate(DateUtils.formatStringToDate(regDate, DateUtils.YYYY_MM));
									}
									if(null == audVO.getMileage()){//评估里程
										audVO.setMileage(Double.valueOf(reList.get(0).getEvalMile()));
									}
								}
								BaseLogUtils.info(logger, "initPrjPrdList", "查询旧车报告数据完成. DATA:" + JSONObject.toJSONString(reList), CurrentThreadContext.getCurrentUserName());
							}
						}
					}
				}
			}
			BaseLogUtils.info(logger, "initList", "查询供应商逾期率和高风险预警接口开始=prjId:" + prjId, CurrentThreadContext.getCurrentUserName());
			if(CollectionUtils.isNotEmpty(list)){
				List<Long> splIds = new ArrayList();
				for (PrjPrdBscInfoVO prjPrdBscInfoVO : list){
					if (StringUtils.isNotEmpty(prjPrdBscInfoVO.getSplId())){
						CapChnOvdRateQC capChnOvdRateQC = new CapChnOvdRateQC();
						capChnOvdRateQC.setChnId(prjPrdBscInfoVO.getSplId());
						capChnOvdRateQC.setChnTypCd("1"); //1.供应商 2.挂靠公司
						capChnOvdRateQC.setOrderBy("OVD_MONTH");
						List<CapChnOvdRateDTO> capChnOvdRateDTOList = this.capChnOvdRateApiService.searchListByCondition(capChnOvdRateQC);
						BaseLogUtils.info(logger, "initList", "查询供应商逾期率返回：" + JSONObject.toJSONString(capChnOvdRateDTOList), CurrentThreadContext.getCurrentUserName());
						if (CollectionUtils.isNotEmpty(capChnOvdRateDTOList)){
							CapChnOvdRateDTO capChnOvdRateDTO = capChnOvdRateDTOList.get(0);
							prjPrdBscInfoVO.setEverRate(capChnOvdRateDTO.getEverRate()== null ? 0:capChnOvdRateDTO.getEverRate());//Ever逾期%
							prjPrdBscInfoVO.setPotRate(capChnOvdRateDTO.getPotRate()== null ? 0:capChnOvdRateDTO.getPotRate());//时点逾期%
						}else {
							prjPrdBscInfoVO.setEverRate(0d);//Ever逾期%
							prjPrdBscInfoVO.setPotRate(0d);//时点逾期%
						}
					} else {
						prjPrdBscInfoVO.setEverRate(0d);//Ever逾期%
						prjPrdBscInfoVO.setPotRate(0d);//时点逾期%
					}
					splIds.add(prjPrdBscInfoVO.getSplId());//供应商ids
				}
				SplHRiskWarnRecQC splHRiskWarnRecQC = new SplHRiskWarnRecQC();
				splHRiskWarnRecQC.setDataIdList(splIds);
				splHRiskWarnRecQC.setDataTyp("SPL"); //SPL:供应商  LNK:挂靠公司
				splHRiskWarnRecQC.setIsWarn(1);
				splHRiskWarnRecQC.setIsDel(0);
				splHRiskWarnRecQC.setIsValid(1);
				splHRiskWarnRecQC.setIsNew(1);
				List<SplHRiskWarnRecDTO> splHRiskWarnRecDTOList = splHRiskWarnRecApiService.checkSplHRiskWarnRecDTOByQC(splHRiskWarnRecQC,CurrentThreadContext.getCurrentSysCd(),CurrentThreadContext.getCurrentOrgCd(), WebBaseConstant.CHANNEL_CD);
				BaseLogUtils.info(logger, "initList", "查询供应商高风险预警接口返回：" + JSONObject.toJSONString(splHRiskWarnRecDTOList), CurrentThreadContext.getCurrentUserName());
				for (PrjPrdBscInfoVO prjPrdBscInfoVO : list){
					if (CollectionUtils.isNotEmpty(splHRiskWarnRecDTOList)){
						for (SplHRiskWarnRecDTO splHRiskWarnRecDTO : splHRiskWarnRecDTOList){
							if (Objects.equals(splHRiskWarnRecDTO.getDataId(), prjPrdBscInfoVO.getSplId())) {
								prjPrdBscInfoVO.setRiskWarnCd("1");
							}
						}
					}
				}
			}
			
			ListPageVO<PrjPrdBscInfoVO> listPage = new ListPageVO<PrjPrdBscInfoVO>(list, pager.getTotalCount());
			BaseLogUtils.info(logger, "initPrjPrdList", "查询数据完成. DATA:" + JSONObject.toJSONString(page), CurrentThreadContext.getCurrentUserName());
			return listPage;
		}catch (Exception e) {
			BaseLogUtils.info(logger, "initPrjPrdList", "=初始化产品列表数据异常=prjId:"+prjId+","+e.getMessage());
			e.printStackTrace();
		}
		return null;
	}
	
	/**
	 * 信审修改项目产品收益率
	 */
	@RequestMapping(value = "/modifyPrjPrdIrrPct.do", method = { RequestMethod.POST })
	@ResponseBody
	public Object modifyPrjPrdIrrPct(HttpServletRequest request, HttpServletResponse response) throws BaseException {
		String id = request.getParameter("id");
		String irrPct = request.getParameter("irrPct");
		DataResultVO result = new DataResultVO(BaseConstant.IS_YESNO_YES, SysLogConstant.LOG_CMM_UPDATE_SUCC);
		if(StringUtils.isEmpty(id)||StringUtils.isEmpty(irrPct)){
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo(SysLogConstant.LOG_CMM_DATA_PK_IS_EMPTY);
			BaseLogUtils.info(logger, "modify", "修改数据,主键不存在.[id="+id+"]", CurrentThreadContext.getCurrentUserName());
			return result;
		}
		PrjPrdBscInfoVO entity = null;
		try {
			entity = new PrjPrdBscInfoVO();
			entity.setId(Long.valueOf(id));
			entity.setIrrPct(Double.valueOf(irrPct));
			boolean success = this.prjPrdBscInfoService.modify(entity);
			if(!success){
				result.setSuccess(BaseConstant.IS_YESNO_NO);
				result.setInfo(SysLogConstant.LOG_CMM_SYS_ERROR);
				BaseLogUtils.info(logger, "modifyPrjPrdIrrPct", "修改失败.[id="+id+"] DATA:" + JSONObject.toJSONString(entity), CurrentThreadContext.getCurrentUserName());
			}
			BaseLogUtils.info(logger, "modifyPrjPrdIrrPct", "修改成功.[id="+id+"] DATA:" + JSONObject.toJSONString(entity), CurrentThreadContext.getCurrentUserName());
		}catch (BaseException ex) {
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo(ex.getMessage());
			BaseLogUtils.info(logger, "modifyPrjPrdIrrPct", "修改失败.[id="+id+"] DATA:" + JSONObject.toJSONString(entity) + ex.getMessage(), CurrentThreadContext.getCurrentUserName());
		}catch (Exception ex) {
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo(SysLogConstant.LOG_CMM_SYS_ERROR);
			BaseLogUtils.error(logger, "modifyPrjPrdIrrPct", "修改失败.[id="+id+"] DATA:" + JSONObject.toJSONString(entity) + ex.getMessage(), CurrentThreadContext.getCurrentUserName());
		}
		return result;
	}
	
	/**
	 * 获取项目评审流程附加信息页面项目相关详情数据
	 * 
	 * @param request
	 * @return
	 * @throws Exception
	 */
	@RequestMapping(value = "/getProjectInfoByPrjId.do", method = { RequestMethod.GET})
	@ResponseBody
	public Object getProjectInfoByPrjId(HttpServletRequest request, HttpServletResponse response) throws BaseException {
		String projectId = request.getParameter("projectId");
		DataResultVO result = new DataResultVO(BaseConstant.IS_YESNO_YES, "获取成功");
		if(StringUtils.isEmpty(projectId)){
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo(SysLogConstant.LOG_CMM_DATA_PK_IS_EMPTY);
			BaseLogUtils.error(logger, "getProjectInfoByPrjId", "获取数据,主键不存在.[projectId="+projectId+"]", CurrentThreadContext.getCurrentUserName());
			return result;
		}
		
		try {
			PrjAuditFlowVO vo = this.prjAuditFlowService.searchPrjAuditFlowByPrjId(Long.valueOf(projectId));
			if(null == vo){
				result.setSuccess(BaseConstant.IS_YESNO_NO);
				result.setInfo(SysLogConstant.LOG_CMM_QUERY_DATA_IS_EMPTY);
				BaseLogUtils.info(logger, "getProjectInfoByPrjId", "获取数据,数据不存在.[projectId="+projectId+"]", CurrentThreadContext.getCurrentUserName());
			}
			result.setData(vo);
			BaseLogUtils.info(logger, "getProjectInfoByPrjId", "获取数据.[projectId="+projectId+"]", CurrentThreadContext.getCurrentUserName());
		}catch(BaseException ex) {
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo(ex.getMessage());
			BaseLogUtils.info(logger, "getProjectInfoByPrjId", "获取失败.[projectId="+projectId+"]"+ex.getMessage(), CurrentThreadContext.getCurrentUserName());
		}catch(Exception ex) {
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo(SysLogConstant.LOG_CMM_SYS_ERROR);
			BaseLogUtils.error(logger, "getProjectInfoByPrjId", "获取失败.[projectId="+projectId+"]"+ex.getMessage(), CurrentThreadContext.getCurrentUserName());
		}
		return result;
	}
	/**
	 * 获取担保人列表信息
	 * 
	 * @param request
	 * @return
	 * @throws Exception
	 */
	@RequestMapping(value = "/getGuarantorByPrjId.do", method = { RequestMethod.GET})
	@ResponseBody
	public Object getGuarantorByPrjId(HttpServletRequest request, HttpServletResponse response) throws BaseException {
		String projectId = request.getParameter("projectId");
		DataResultVO result = new DataResultVO(BaseConstant.IS_YESNO_YES, "获取成功");
		if(StringUtils.isEmpty(projectId)){
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo(SysLogConstant.LOG_CMM_DATA_PK_IS_EMPTY);
			BaseLogUtils.error(logger, "getGuarantorByPrjId", "获取数据,主键不存在.[projectId="+projectId+"]", CurrentThreadContext.getCurrentUserName());
			return result;
		}
		
		try {
			List<PrjCstBscInfoVO> guarantorList = this.prjAuditFlowService.searchGuarantorList(Long.valueOf(projectId));
			if(null == guarantorList){
				result.setSuccess(BaseConstant.IS_YESNO_NO);
				result.setInfo(SysLogConstant.LOG_CMM_QUERY_DATA_IS_EMPTY);
				BaseLogUtils.info(logger, "getGuarantorByPrjId", "获取数据,数据不存在.[projectId="+projectId+"]", CurrentThreadContext.getCurrentUserName());
			}
			result.setData(guarantorList);
			BaseLogUtils.info(logger, "getGuarantorByPrjId", "获取数据.[projectId="+projectId+"]", CurrentThreadContext.getCurrentUserName());
		}catch(BaseException ex) {
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo(ex.getMessage());
			BaseLogUtils.info(logger, "getGuarantorByPrjId", "获取失败.[projectId="+projectId+"]"+ex.getMessage(), CurrentThreadContext.getCurrentUserName());
		}catch(Exception ex) {
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo(SysLogConstant.LOG_CMM_SYS_ERROR);
			BaseLogUtils.error(logger, "getGuarantorByPrjId", "获取失败.[projectId="+projectId+"]"+ex.getMessage(), CurrentThreadContext.getCurrentUserName());
		}
		return result;
	}
	
	/**
	 * 到流程附加信息页面
	 */
	@RequestMapping(value = "/toAdditionalInfoPage.do", method = { RequestMethod.GET, RequestMethod.POST })
	public ModelAndView toAdditionalInfoPage(HttpServletRequest request, HttpServletResponse response) {
		String projectId = request.getParameter("projectId");//项目ID
		BaseLogUtils.newLogger("到流程附加信息页面,当前节点,projectId:{},参数:{}", projectId, JSON.toJSONString(request.getParameterMap())).info();
		String proIntId = request.getParameter("processInstanceId");//流程实例ID
		String taskId = request.getParameter("taskId");//任务ID
		String taskDefKey = request.getParameter("taskDefKey");//任务KEY
		String isDetail = request.getParameter("isDetail");//1:其他节点 0:信审节点
		String taskNm = request.getParameter("taskNm");//任务名称
		String ctrlKey = request.getParameter("ctrlKey");//资料标识//控制键 1.可上传、下载、删除 2.可验证 3.不可操作
        String exposureSource = request.getParameter("exposureSource");//是否展示敞口
		// 是否项目外派流程 1: 是
		String isExpFlow = request.getParameter("isExpFlow");
		String homeButton = request.getParameter("homeButton");
		// 轻卡参数
		String lcvCheck = request.getParameter("lcvCheck");
		// 敞口是否使用缓存
		String useCache = request.getParameter("useCache");
		// 轻卡敞口按钮是否展示
		String showLcvArBtn = request.getParameter("showLcvArBtn");
		// 换车标志
		String prjPrdChangeFlag = request.getParameter("prjPrdChangeFlag");
		//cds分流审批标志
		String isCdsApproval = request.getParameter("isCdsApproval");

		if(StringUtils.isNotEmpty(proIntId)) proIntId = proIntId.replace("\'", "");
		if(StringUtils.isNotEmpty(taskId)) taskId = taskId.replace("\'", "");
		if(StringUtils.isNotEmpty(taskDefKey)) taskDefKey = taskDefKey.replace("\'", "");
		if(StringUtils.isNotEmpty(taskNm)) taskNm = taskNm.replace("\'", "");
		ModelAndView view = new ModelAndView("project/additionalInfo/audNodeAdditionalInfo");
		view.addObject("lcvCheck", lcvCheck);
		view.addObject("useCache",useCache);
		view.addObject("showLcvArBtn",showLcvArBtn);
		view.addObject("isCdsApproval",isCdsApproval);
		// 轻卡
		if(StringUtils.isNotEmpty(lcvCheck) && "1".equals(lcvCheck)){
			view.setViewName("project/additionalInfo/audNodeAdditionalInfoForLcv");
			List<String> codeGrpCdList = new ArrayList<>();
			codeGrpCdList.add(DictionaryConstant.CODE_GRP_MAR_STS_CD);
			codeGrpCdList.add(DictionaryConstant.CODE_GRP_GENDER_CD);
			codeGrpCdList.add(fl.customer.facade.framework.constant.DictionaryConstant.CODE_GRP_BACK_PAY_TYP_CD);
			codeGrpCdList.add(fl.customer.facade.framework.constant.DictionaryConstant.CODE_GRP_PRJ_CTRL_CD);
			Map<String, List<KeyValueVO>> dicMap = this.sysDictionaryService.getMultiKvList(CurrentThreadContext.getFlServiceSysCd(), CurrentThreadContext.getCurrentOrgCd(), codeGrpCdList);
			view.addObject("searchSelectMarStsCdList", dicMap.get(DictionaryConstant.CODE_GRP_MAR_STS_CD));// 婚姻状况
		} else if (StringUtils.isNotEmpty(prjPrdChangeFlag) && "true".equals(prjPrdChangeFlag)) {
			view.setViewName("project/additionalInfo/audNodeAdditionalInfoForHC");
			String prjPrdId = request.getParameter("prjPrdId");
			view.addObject("prjPrdId",prjPrdId);
		}
		try {
			String isMdfQuatPrps = "0";//方案是否修改
			if(this.cacheService.keyExists(projectId)){
				isMdfQuatPrps = "1";
			}
			view.addObject("isMdfQuatPrps", isMdfQuatPrps);

			view.addObject("projectId", projectId);
			view.addObject("proIntId", proIntId);
			view.addObject("taskId", taskId);
			view.addObject("taskDefKey", taskDefKey);
			view.addObject("taskNm", taskNm);
			view.addObject("isDetail", isDetail);
			view.addObject("ctrlKey", ctrlKey);
            view.addObject("exposureSource", exposureSource);
            view.addObject("currentUsrId", CurrentThreadContext.getCurrentUserId());
			if (StringUtils.isEmpty(isExpFlow) && StringUtils.isNotBlank(projectId) && StringUtils.isNotBlank(proIntId) ){
				SysFlowSHQueryCondition sysFlowSHQC = new SysFlowSHQueryCondition();
				sysFlowSHQC.setDataId(Long.valueOf(projectId));
				sysFlowSHQC.setWordsInTheTable(PrjBscInfoConstant.PRJ_FLOW_S_H_PRJ);
				sysFlowSHQC.setBusTyp("071");
				sysFlowSHQC.setpInstId(proIntId);
				sysFlowSHQC.setSysCd(CurrentThreadContext.getCurrentSysCd());
				sysFlowSHQC.setStatus(BaseConstant.IS_YESNO_YES); //数据状态(是否最新0:否 1:是)
				List<SysFlowSHDTO> sysFlowSHList = this.flowQueryApiService.searchFlowSHList(sysFlowSHQC);
				if (CollectionUtils.isNotEmpty(sysFlowSHList)){
					isExpFlow = "1";
				}
			}
			view.addObject("isExpFlow", isExpFlow);
			view.addObject("homeButton", homeButton);
			if (StringUtils.isNotEmpty(isExpFlow) && "1".equals(isExpFlow) && StringUtils.isNotEmpty(projectId)) {
				ExpBizManRecQC expBizManRecQC = new ExpBizManRecQC();
				expBizManRecQC.setDataId(Long.valueOf(projectId));
				expBizManRecQC.setIsDel(BaseConstant.IS_YESNO_NO);
				BaseLogUtils.newWebLogger("===查询项目外派人员记录表Start===prjId:" + projectId).info();
				List<ExpBizManRecVO> expBizManRecVOList = this.expBizManRecService.searchList(expBizManRecQC);
				BaseLogUtils.newWebLogger("===查询项目外派人员记录表End===prjId:" + projectId + ",expBizManRecVOList:" + JSON.toJSONString(expBizManRecVOList)).info();
				for (ExpBizManRecVO expBizManRecVO : expBizManRecVOList) {
					String aptTypCd = expBizManRecVO.getAptTypCd();
					Long usrId = expBizManRecVO.getUsrId();
					String rlNm = expBizManRecVO.getRlNm();
					String usrNm = expBizManRecVO.getUsrNm();
					if (StringUtils.isNotEmpty(aptTypCd)) {
						if ("FLOW_0000_071_001_001".equals(taskDefKey) && "1".equals(aptTypCd)) {
							view.addObject("areaMgrId", usrId);
							view.addObject("areaMgrUsrNm", usrNm);
							view.addObject("areaMgrNm", rlNm);
						}
						if ("FLOW_0000_071_001_002".equals(taskDefKey) && "2".equals(aptTypCd)) {
							view.addObject("homeMgrId", usrId);
							view.addObject("homeMgrUsrNm", usrNm);
							view.addObject("homeMgrNm", rlNm);
						}
						if ("FLOW_0000_071_001_002".equals(taskDefKey) && "3".equals(aptTypCd)) {
							view.addObject("mortgageMgrId", usrId);
							view.addObject("mortgageMgrUsrNm", usrNm);
							view.addObject("mortgageMgrNm", rlNm);
						}
					}
				}
				if ("FLOW_0000_071_001_002".equals(taskDefKey)) {
					PrjPrdDtlQueryCondition prjPrdDtlQC = new PrjPrdDtlQueryCondition();
					prjPrdDtlQC.setPrjId(Long.valueOf(projectId));
					prjPrdDtlQC.setSysCd(CurrentThreadContext.getCurrentSysCd());
					prjPrdDtlQC.setOrgCd(CurrentThreadContext.getCurrentOrgCd());
					prjPrdDtlQC.setIsDel(BaseConstant.IS_YESNO_NO);
					BaseLogUtils.newWebLogger("===查询项目产品信息Start===prjPrdDtlQC:" + JSON.toJSONString(prjPrdDtlQC)).info();
					List<PrjPrdDtlDTO> prjPrdDtlDTOS  = this.projectApiService.selectPrjPrdDtlList(prjPrdDtlQC);
					BaseLogUtils.newWebLogger("===查询项目产品信息Start===prjPrdDtlDTOS-size:" + (CollectionUtils.isEmpty(prjPrdDtlDTOS)?0:prjPrdDtlDTOS.size())).info();
					// 车辆明细id
					List<Long> dtlIdList = new ArrayList<>();
					for (PrjPrdDtlDTO prjPrdDtlDTO : prjPrdDtlDTOS) {
						if (CollectionUtils.isEmpty(dtlIdList) || !dtlIdList.contains(prjPrdDtlDTO.getId())) dtlIdList.add(prjPrdDtlDTO.getId());
					}
					BaseLogUtils.newServiceLogger("===项目产品信息dtlIdList===dtlIdList:" + JSON.toJSONString(dtlIdList)).info();
					if (CollectionUtils.isNotEmpty(dtlIdList)) {
						ExpBizManRecQC expBizManRecQCDtl = new ExpBizManRecQC();
						expBizManRecQCDtl.setDataIdList(dtlIdList);
						expBizManRecQCDtl.setDataTypCd("DTL");
						expBizManRecQCDtl.setIsDel(BaseConstant.IS_YESNO_NO);
						BaseLogUtils.newServiceLogger("==查询项目外派抵押人信息Start==prjId:" + projectId + ",expBizManRecQCDtl:" + JSON.toJSONString(expBizManRecQCDtl)).info();
						List<ExpBizManRecVO> expBizManRecDTOListDtl = this.expBizManRecService.searchList(expBizManRecQCDtl);
						BaseLogUtils.newServiceLogger("==查询项目外派抵押人信息End==prjId:" + projectId + ",expBizManRecDTOListDtl:" + JSON.toJSONString(expBizManRecDTOListDtl)).info();
						for (ExpBizManRecVO expBizManRecVO : expBizManRecDTOListDtl) {
							Long usrId = expBizManRecVO.getUsrId();
							String rlNm = expBizManRecVO.getRlNm();
							String usrNm = expBizManRecVO.getUsrNm();
							if (StringUtils.isNotEmpty(usrId) && StringUtils.isNotEmpty(rlNm)) {
								view.addObject("mortgageMgrId", usrId);
								view.addObject("mortgageMgrUsrNm", usrNm);
								view.addObject("mortgageMgrNm", rlNm);
								break;
							}
						}
					}
				}
			}
			// 需要信审页面展示项目风险审核提醒的节点
			BaseLogUtils.newLogger("到流程附加信息页面,当前节点,projectId:{},taskDefKey:{}", projectId, taskDefKey).info();
			if (PrjRskAudWarnRecConstant.NEED_SHOW_PRJ_RSK_AUD_WARN_KEY_LIST.contains(taskDefKey)) {
				view.addObject("showPrjRskAudWarn", true);
			}
            // 信审员初审，新能源汽车快捷报单流程 三方资管城配业务工行评审流程 重卡城配项目评审流程 信审员审核
			if((StringUtils.isNotEmpty(taskNm) && (taskNm.indexOf("信审") != -1 && taskNm.indexOf("初审") != -1))
					|| "FLOW_00000001_001_001_001".equals(taskDefKey) || "FLOW_00000013_001_002_001".equals(taskDefKey) || "FLOW_00000001_001_004_001".equals(taskDefKey)) {
				view.addObject("fromCAFlag", true);
			}
			int guaraStatus = 1;//担保人操作按钮展示状态
			if (StringUtils.isNotBlank(taskDefKey)) {
				if (PrjBscInfoConstant.VERIFY_DBR_CAN_PUSH_FLOW_NO.contains(taskDefKey)){
					guaraStatus = 2;
				}
				if (PrjBscInfoConstant.VERIFY_DBR_CAN_DEL_FLOW_NO.contains(taskDefKey)){
					guaraStatus = 3;
				}
			}
			view.addObject("guaraStatus", guaraStatus);

			String confirmPay = request.getParameter("confirmPay");//付款审核 1:可以审核付款可以取消放款 2:只可以审核不可以取消3:车抵贷业务 可以审核不可以取消 显示放款通过意见和驳回意见
			view.addObject("confirmPay", confirmPay);
			String version = request.getParameter("version");
			view.addObject("version", version);
			
			//征信附议
			String showCredit = request.getParameter("showCredit");//是否显示
			view.addObject("showCredit", showCredit);
			String flag = request.getParameter("flag");//征信标识
			view.addObject("flag", flag);
			
			//核价员核价标识
			String isNeedPrice = request.getParameter("isNeedPrice");
			view.addObject("isNeedPrice", isNeedPrice);
			
			//修改GPS标识
			String isGpsNode = request.getParameter("isGpsNode");
			view.addObject("isGpsNode", isGpsNode);

			//生成人保资料标识
			String rbflag = request.getParameter("rbflag");
			view.addObject("rbflag", rbflag);
			
			//查询项目信息
			PrjBscInfoVO prjBscInfoVO = null;
			String mp = "";//客户经理手机号
			Long registrationCd =0L;
			Long yqFormerPrjId = null;
			if(StringUtils.isNotEmpty(projectId)){
				prjBscInfoVO = this.prjBscInfoService.selectById(Long.valueOf(projectId));
				double rntAmt = 0d;
				if ("CDDYWYQ".equals(prjBscInfoVO.getPrjTypCd())) {
					PrjPrdPaySchMQueryCondition qcondition = new PrjPrdPaySchMQueryCondition();
					qcondition.setPrjId(Long.parseLong(projectId));
					List<PrjPrdPaySchMVO> prjPrdPaySchMVOS = prjPrdPaySchMService.searchList(qcondition);
					for (PrjPrdPaySchMVO prjPrdPaySchMVO : prjPrdPaySchMVOS) {
						if (prjPrdPaySchMVO.getEachEstRntAmt() != null) {
							rntAmt = rntAmt + prjPrdPaySchMVO.getEachEstRntAmt();
						}
					}
					view.addObject("moneyMonth", DecimalUtils.convertFenToYuan(Double.valueOf((rntAmt)).longValue()));
					PrjPaySchMYqQC qc = new PrjPaySchMYqQC();
					qc.setPrjId(Long.parseLong(projectId));
					List<PrjPaySchMYqDTO> prjPaySchMYqDTOS = prjPaySchMYqApiService.searchList(qc);
					BaseLogUtils.newServiceLogger("查询疫情项目结果为projectId=" + projectId + ",prjPaySchMYqDTOS:" + JSON.toJSONString(prjPaySchMYqDTOS)).info();
					if (CollectionUtils.isNotEmpty(prjPaySchMYqDTOS)) {
						AuditCreditInfoQueryCondition audCreditInfoQueryCondition = new AuditCreditInfoQueryCondition();
						audCreditInfoQueryCondition.setProIntId(proIntId);
						audCreditInfoQueryCondition.setProjectId(Long.valueOf(projectId));
						AudCreditInfoVO audCreditInfoVO = this.audCreditInfoService.selectAudCreditInfoByQc(audCreditInfoQueryCondition);
						BaseLogUtils.newServiceLogger("查询疫情项目结果为projectId=" + projectId + ",AudCreditInfoVO:" + JSON.toJSONString(audCreditInfoVO)).info();
						if (audCreditInfoVO == null || StringUtils.isEmpty(audCreditInfoVO.getId())) {//如果为空说明CDDYWYQ项目没保存过，去查询老项目的信息
							if (CollectionUtils.isNotEmpty(prjPaySchMYqDTOS) && prjPaySchMYqDTOS.get(0) != null && StringUtils.isNotEmpty(prjPaySchMYqDTOS.get(0).getyPrjId())) {
                                yqFormerPrjId = prjPaySchMYqDTOS.get(0).getyPrjId();
                                view.addObject("yqFormerPrjId", yqFormerPrjId);
                                //根据项目查询流程记录拿到原流程实例
                                SysFlowSHQueryCondition sysFlowSHQC = new SysFlowSHQueryCondition();
                                sysFlowSHQC.setDataId(yqFormerPrjId);
                                sysFlowSHQC.setWordsInTheTable(PrjBscInfoConstant.PRJ_FLOW_S_H_PRJ);
                                sysFlowSHQC.setSysCd(CurrentThreadContext.getCurrentSysCd());
                                sysFlowSHQC.setStatus(BaseConstant.IS_YESNO_YES); //数据状态(是否最新0:否 1:是)
                                List<SysFlowSHDTO> sysFlowSHList = this.flowQueryApiService.searchFlowSHList(sysFlowSHQC);
                                String yqFormerProIntId = "";
                                if (CollectionUtils.isNotEmpty(sysFlowSHList)) {
                                    yqFormerProIntId = sysFlowSHList.get(0).getPInstId();
                                    view.addObject("yqFormerProIntId", yqFormerProIntId);
                                }
                                BaseLogUtils.newServiceLogger("疫情项目yqFormerPrjId==" + yqFormerPrjId + ",yqFormerProIntId:" + yqFormerProIntId).info();
							}
						}
					}
				}
				if(null!=prjBscInfoVO && StringUtils.isNotEmpty(prjBscInfoVO.getCstMgrId())){
					SysUsrVO sysUsrVO = this.sysUsrService.selectById(prjBscInfoVO.getCstMgrId(), CurrentThreadContext.getCurrentSysCd());
					if(null!=sysUsrVO && StringUtils.isNotBlank(sysUsrVO.getMp())){
						mp = sysUsrVO.getMp();
					}
				}
				String flowStsCdFlag = "0";
				if (StringUtils.isNotEmpty(isDetail) && BaseConstant.IS_YESNO_NO_STR.equals(isDetail)
						&& (PrjBscInfoConstant.PRJ_TYP_CD_CDDYWUL.equals(prjBscInfoVO.getPrjTypCd())
						|| PrjBscInfoConstant.PRJ_TYP_CD_OWNJYD.equals(prjBscInfoVO.getPrjTypCd())
						|| PrjBscInfoConstant.PRJ_TYP_CD_ESCJYD.equals(prjBscInfoVO.getPrjTypCd()))) {
					//查询流程状态
					SysFlowSHQueryCondition queryCondition = new SysFlowSHQueryCondition();
					queryCondition.setSysCd(CurrentThreadContext.getCurrentSysCd());
					queryCondition.setDataId(prjBscInfoVO.getId());
					queryCondition.setWordsInTheTable(PrjBscInfoConstant.PRJ_FLOW_S_H_PRJ);
					queryCondition.setStatus(BaseConstant.IS_YESNO_YES);
					queryCondition.setBusTyp(FlowConstant.FLOW_MODEL_TYP_PRJ_1);
					List<SysFlowSHDTO> flowSHDTOList = this.flowQueryApiService.searchFlowSHList(queryCondition);
					if (CollectionUtils.isNotEmpty(flowSHDTOList)) {
						SysFlowSHDTO sysFlowSHDTO = flowSHDTOList.get(0);
						//预审审核节点，展示修改项目信息按钮
						if ("7".equals(sysFlowSHDTO.getAudStsCd())) {
							flowStsCdFlag = "1";
							PrjPreAudInfoQueryCondition condition = new PrjPreAudInfoQueryCondition();
							condition.setPrjId(prjBscInfoVO.getId());
							condition.setIsDel(0);
							BaseLogUtils.newLogger("预审审核节点，查询前置征信id，prjId：{},condition:{}",prjBscInfoVO.getId(),JSON.toJSONString(condition)).info();
							ResponseData<List<PrjPreAudInfoDTO>> responseData = prjPreAudInfoService.selectList(condition);
							BaseLogUtils.newLogger("预审审核节点，查询前置征信id，prjId：{},responseData:{}",prjBscInfoVO.getId(),JSON.toJSONString(responseData)).info();
							if (null != responseData && ResponseData.SUCCESS_CODE.equals(responseData.getCode()) && CollectionUtils.isNotEmpty(responseData.getData())){
								PrjPreAudInfoDTO prjPreAudInfoDTO = responseData.getData().get(0);
								Long rcCstBscInfoId = prjPreAudInfoDTO.getRcCstBscInfoId();
								view.addObject("rcCstBscInfoId", rcCstBscInfoId);
							}
						}
					}
				}
				view.addObject("flowStsCdFlag", flowStsCdFlag);
				view.addObject("isInternalTransfer",prjBscInfoVO.getIsInternalTransfer()) ;
				// 验车、里程相关
				try{
					if (prjBscInfoVO.getPrjTypCd().equals(PrjBscInfoConstant.PRJ_TYP_CD_CDDYWUL)) {
						registrationCd = this.prjBscInfoService.areOrNoRegistration(Long.valueOf(projectId));//查询验车信息是否录入
						if (registrationCd == BaseConstant.IS_YESNO_YES) {
							String validationCar = this.prjBscInfoService.checkMileage(Long.valueOf(projectId));//里程数据判断
							view.addObject("validationCar", validationCar);
						}
						view.addObject("registrationCd", registrationCd);
					}
				}catch (Exception e){
					BaseLogUtils.info(logger,"checkMileage","车抵贷线下验车异常"+projectId,CurrentThreadContext.getCurrentUserName(),e);
				}
				//重卡事业部 传统业务或城配业务 团单项目且是重卡城配和重卡回租流程信审节点展示预筛选项目
				BaseLogUtils.newServiceLogger("团单项目信审节点查看同一预筛选项目信息 prjBscInfoVO:" + JSON.toJSONString(prjBscInfoVO) + ",isDetail:" + isDetail + "taskDefKey:" + taskDefKey).info();
				if (prjBscInfoVO != null && prjBscInfoVO.getPreRouteId() != null && BaseConstant.IS_YESNO_NO_STR.equals(isDetail)) {
					PrjBscInfoQueryCondition qc = new PrjBscInfoQueryCondition();
					qc.setPreRouteId(prjBscInfoVO.getPreRouteId());
					List<PrjBscInfoVO> prePrjBscInfoVOS = this.prjBscInfoService.searchPrePrjBscInfoList(qc);
					BaseLogUtils.newServiceLogger("团单项目信审节点查看同一预筛选项目信息 preRouteId:" + prjBscInfoVO.getPreRouteId() + ",prePrjBscInfoVOS:" + JSON.toJSONString(prePrjBscInfoVOS)).info();
					view.addObject("prePrjBscInfoVOS", prePrjBscInfoVOS);
					view.addObject("preRouteId", prjBscInfoVO.getPreRouteId());
					view.addObject("preRouteTipsInfo", prjBscInfoVO.getCstNm() + prjBscInfoVO.getPreRouteId());
				}
			}
			view.addObject("mp", mp);
			view.addObject("prjTypCd", prjBscInfoVO.getPrjTypCd());
			view.addObject("bizTypCd",prjBscInfoVO.getBizTypCd());
			view.addObject("isInsBiz", prjBscInfoVO.getIsInsBiz());
			view.addObject("buOrgCd", prjBscInfoVO.getBuOrgCd());
			view.addObject("isSqlMfr", prjBscInfoVO.getIsSplMfr());
			view.addObject("insCode", prjBscInfoVO.getInsCode());
			// 查找资管机构模块配置
			if(StringUtils.isNotBlank(prjBscInfoVO.getInsCode())) {
				SysInsTabCfgVO sysInsTabCfgVO = this.sysInsTabCfgService.selectByInsCode(prjBscInfoVO.getInsCode());
				if(sysInsTabCfgVO != null) {
					view.addObject("sysInsTabCfgVO", sysInsTabCfgVO);
				}
			}
			//是否自融
			if (prjBscInfoVO.getIsSelfMelt()!=null){
				view.addObject("isSelfMelt", prjBscInfoVO.getIsSelfMelt());
			}
			//线路类型
			List<KeyValueVO> CircuitTypeCd = this.audReturnVisitService.searchCircuitTypeList();
			view.addObject("CircuitTypeCd", CircuitTypeCd);
			//装卸方式
			List<KeyValueVO> HanglingModeCd = this.audReturnVisitService.searchHanglingModeList();
			view.addObject("HanglingModeCd", HanglingModeCd);
			AudReturnVisitVO voAud = this.audReturnVisitService.selectByProjectIdAndProIntId(Long.valueOf(projectId));
			view.addObject("voAud", voAud);
			if(null != voAud.getId()){
				GetAudOpeLineByVisitIdRequest getRequest = new GetAudOpeLineByVisitIdRequest();
				getRequest.setVisitId(voAud.getId());
				getRequest.setSysCd(CurrentThreadContext.getCurrentSysCd());
				ResponseData<List<AuditOpeLineDTO>> responseData = auditOpeLineService.getAudvisitOperateLineByVisitId(getRequest);
				List<AudOpeLineVO> audOpeLineList = new ArrayList<>();
				if (responseData != null && ResponseData.SUCCESS_CODE.equals(responseData.getCode()) && responseData.getData() != null) {
					List<AuditOpeLineDTO> auditOpeLineDTOS = responseData.getData();
					for (AuditOpeLineDTO auditOpeLineDTO : auditOpeLineDTOS) {
						AudOpeLineVO audOpeLineVO = new AudOpeLineVO();
						BeanUtils.copyProperties(auditOpeLineDTO, audOpeLineVO);
						audOpeLineList.add(audOpeLineVO);
					}
				}
		         if(null != audOpeLineList && audOpeLineList.size() !=0 ){
					view.addObject("audOpeLineList",audOpeLineList);
					view.addObject("size",audOpeLineList.size());
				}else{
					view.addObject("size",null);
				}
			}else{
				view.addObject("size",null);
			}
			AuditCreditInfoQueryCondition AudCreditInfoqc = new AuditCreditInfoQueryCondition();
			AudCreditInfoqc.setProIntId(proIntId);
			AudCreditInfoqc.setProjectId(Long.valueOf(projectId));
			AudCreditInfoVO vo = this.audCreditInfoService.selectAudCreditInfoByQc(AudCreditInfoqc);
			if(null == vo){
				BaseLogUtils.info(logger, "getByProjectIdAndProIntId", "获取数据,数据不存在.projectId:"+projectId+",proIntId:"+proIntId, CurrentThreadContext.getCurrentUserName());
			}else{
				String circuitType = vo.getCircuitType();
				view.addObject("CreditInfocircuitType", circuitType);
				String cargoWeigth = vo.getCargoWeigth();
				view.addObject("CreditInfocargoWeigth", cargoWeigth);
				String cargoVomule = vo.getCargoVomule();
				view.addObject("CreditInfocargoVomule", cargoVomule);
				String handingMode = vo.getHandingMode();
				view.addObject("CreditInfohandingMode", handingMode);
				String circuitEfficiency = vo.getCircuitEfficiency();
				view.addObject("CreditInfocircuitEfficiency", circuitEfficiency);
				String fare = vo.getFare();
				view.addObject("CreditInfofare", fare);
				view.addObject("CreditInfovo", vo);
				
			}
			if(voAud != null &&StringUtils.isNotBlank(voAud.getCircuitType())){
				view.addObject("CircuitType", voAud.getCircuitType());
			}
			if(voAud != null &&StringUtils.isNotBlank(voAud.getCargoWeigth())){
				view.addObject("cargoWeigth", voAud.getCargoWeigth());
			}
			if(voAud != null &&StringUtils.isNotBlank(voAud.getCargoVomule())){
				view.addObject("cargoVomule", voAud.getCargoVomule());
			}
			if(voAud != null &&StringUtils.isNotBlank(voAud.getHandingMode())){
				view.addObject("HandingMode", voAud.getHandingMode());
			}
			if(voAud != null &&StringUtils.isNotBlank(voAud.getCircuitEfficiency())){
				view.addObject("circuitEfficiency", voAud.getCircuitEfficiency());
			}
			if(voAud != null &&StringUtils.isNotBlank( voAud.getFare())){
				view.addObject("fare", voAud.getFare());
			}
			List<KeyValueVO> provinceKVList = this.sysRegionService.searchProvinceKVList();
			view.addObject("provinceKVList", provinceKVList);
			//系统判断方案审核结果
			String auditInfo = prjBscInfoVO.getAuditInfo();
			// 轻卡
			if(StringUtils.isNotEmpty(lcvCheck) && "1".equals(lcvCheck)){
				view.addObject("buOrgCd", prjBscInfoVO.getBuOrgCd());
				try {
					String businessCode = PropertiesUtils.getProperty(LcvCdsConstant.CDS_LCV_BUSINESS_CODE_PRJ);
					LcvCdsResDTO lcvCdsResDTO = prjPlcyIndexApiService.searchCdsResultForLcv(Long.valueOf(projectId), businessCode);
					if(null != lcvCdsResDTO){
						auditInfo = lcvCdsResDTO.getNotice();
					}
				}catch (Exception e){
					BaseLogUtils.newLogger("toAdditionalInfoPage prj searchCdsResultForLcv" + e.getMessage()).setKeys("searchCdsResultForLcv").info();
					auditInfo = "--";
				}
			}
			if(StringUtils.isNotEmpty(auditInfo)){
				String replaceAll = auditInfo.replaceAll(">>", "</br>");
				view.addObject("auditInfo", replaceAll);
			}
			
			String cstLvlCdNm = "";
			if(null!=prjBscInfoVO && StringUtils.isNotEmpty(prjBscInfoVO.getCstId())){
				String orgCd = prjBscInfoVO.getCstMgrOrgCd();
				String buOrgCd = "";
				if(orgCd!=null&&orgCd.length()>8){
					buOrgCd = orgCd.substring(0,8);
				}
				CstBscInfoVO cstBscInfoVO = this.cstBscInfoService.selectDetailBy(prjBscInfoVO.getCstId(),orgCd,buOrgCd);
				if(null!=cstBscInfoVO){
					cstLvlCdNm = cstBscInfoVO.getCstLvlCdNm();
				}
				
			}
			view.addObject("cstLvlCdNm", cstLvlCdNm);
			
			//三方资管查询征信结果
			try {
				//三方资管-工行
				if(PrjBscInfoConstant.PRJ_INS_CODE_ICBC.equals(prjBscInfoVO.getInsCode())){
					view.addObject("icbc", "1");
					//工行上浮比例
					List<SysDictionaryDTO>  floatPctList = this.sysDictionaryApiService.searchGroup(CurrentThreadContext.getCurrentSysCd(), CurrentThreadContext.getCurrentBuOrgCd(), DictionaryConstant.CODE__PRJ_PRD_PAY_GH_FLOAT_PCT);
					if(CollectionUtils.isNotEmpty(floatPctList)){
						for (SysDictionaryDTO sysDictionaryDTO : floatPctList) {
							if(StringUtils.isNotBlank(sysDictionaryDTO.getCodeAttr1())&&sysDictionaryDTO.getCodeAttr1().equals(String.valueOf(BaseConstant.IS_YESNO_YES))){
								Double floatPct = Double.valueOf(sysDictionaryDTO.getCode());
								view.addObject("floatPct", floatPct);
								break;
							}
						}
					}
				}else{
					view.addObject("icbc", "0");
				}
				//资管-苏宁
				if(null!=prjBscInfoVO.getPrjCstAccInfoVO()){
					PrjCstAccInfoVO prjCstAccInfoVO = prjBscInfoVO.getPrjCstAccInfoVO();
					view.addObject("prjCstAccNo", prjCstAccInfoVO.getAccNo());//银行账号
					view.addObject("prjCstmp", prjCstAccInfoVO.getMp());//银行卡绑定手机号
					view.addObject("prjCstInsAccNo", prjCstAccInfoVO.getInsAccNo());//机构户头号
				}
				
				String insCode = "";//三方机构标识
				if(StringUtils.isNotEmpty(prjBscInfoVO.getInsCode())){
					insCode = prjBscInfoVO.getInsCode();
				}
				view.addObject("insCode", insCode);
				
				if(null!=prjBscInfoVO && StringUtils.isNotEmpty(prjBscInfoVO.getPrjTypCd()) && null!=prjBscInfoVO.getFundRasInsId()){

					//REQ-3756 36资管机构路由 by yaoxiurong 作废第三方资管城配,第三方资管传统 新增字段IS_INS_BIZ标识是否资管业务
					if((null!=prjBscInfoVO.getIsInsBiz() && BaseConstant.IS_YESNO_YES==prjBscInfoVO.getIsInsBiz().intValue())){
						
							//查询征信发送状态
							InfTransLogQueryCondition itlQC = new InfTransLogQueryCondition();
							//浙商查询条件特殊处理
							if(PrjBscInfoConstant.PRJ_INS_CODE_ZS.equals(prjBscInfoVO.getInsCode())){
								itlQC.setAction(cmm.mid.core.framework.constant.tripartite.InterfaceConstants.Action.submitCredit.key());//提交征信查询
								itlQC.setCstId(prjBscInfoVO.getCstId());//客户ID
								itlQC.setFundRasInsId(prjBscInfoVO.getFundRasInsId());
								itlQC.setStatus(cmm.mid.core.framework.constant.tripartite.InterfaceConstants.TransStatus.success.key());//成功状态
							}else if(PrjBscInfoConstant.PRJ_INS_CODE_WS.equals(prjBscInfoVO.getInsCode())){
								//网商查询条件处理
								itlQC.setAction(cmm.mid.core.framework.constant.tripartite.InterfaceConstants.Action.applyLoan.key());//申请贷款
								itlQC.setPrjId(Long.valueOf(projectId));
							}else{
								itlQC.setAction(cmm.mid.core.framework.constant.tripartite.InterfaceConstants.Action.submitCredit.key());//提交征信查询
								itlQC.setPrjId(Long.valueOf(projectId));
								itlQC.setFundRasInsId(prjBscInfoVO.getFundRasInsId());
							}
							BaseLogUtils.info(logger, "toAdditionalInfoPage", "===查询征信发送结果Start===prjId:"+projectId+",itlQC:"+JSON.toJSONString(itlQC), CurrentThreadContext.getCurrentUserName());
							List<InfTransLogDTO> findTransLogs = this.transLogApi.findTransLogs(itlQC);
							BaseLogUtils.info(logger, "toAdditionalInfoPage", "===查询征信发送结果End===prjId:"+projectId+",findTransLogs:"+JSON.toJSONString(findTransLogs), CurrentThreadContext.getCurrentUserName());
							String sendStatus = "";//征信发送状态
							if(CollectionUtils.isNotEmpty(findTransLogs)){
								InfTransLogDTO infTransLogDTO = findTransLogs.get(0);
								if(null!=infTransLogDTO){
									sendStatus = infTransLogDTO.getStatus();
								}
							}
							view.addObject("sendStatus", sendStatus);//同步状态 unsent-未发送  success-发送成功  failure-发送失败
							view.addObject("sendStatusNm", this.getStatusNm(sendStatus));
							
							//网商查询结果
							String auditResult = "";
							if("success".equals(sendStatus) && PrjBscInfoConstant.PRJ_INS_CODE_WS.equals(prjBscInfoVO.getInsCode())){
								InfTransLogQueryCondition itlQCondition = new InfTransLogQueryCondition();
								itlQCondition.setAction(cmm.mid.core.framework.constant.tripartite.InterfaceConstants.Action.queryLoan.key());//查询贷款
								itlQCondition.setPrjId(Long.valueOf(projectId));
								BaseLogUtils.info(logger, "toAdditionalInfoPage", "= transLogApi.findTransLogs 查询审核结果Start=prjId:"+projectId+",itlQCondition:"+JSON.toJSONString(itlQCondition));
								List<InfTransLogDTO> findTransLogsRst = this.transLogApi.findTransLogs(itlQCondition);
								BaseLogUtils.info(logger, "toAdditionalInfoPage", "= transLogApi.findTransLogs 查询审核结果End=prjId:"+projectId+",findTransLogsRst:"+JSON.toJSONString(findTransLogsRst));
								if(CollectionUtils.isNotEmpty(findTransLogsRst)){
									InfTransLogDTO infTransLogDTO = findTransLogsRst.get(0);
									if(null!=infTransLogDTO){
										auditResult = infTransLogDTO.getRespCode();
									}
								}
							}
							view.addObject("auditResult", auditResult);//审核结果
							view.addObject("auditDesc", "");//审核描述
							
							//浙商查询结果     因为浙商没有客户信息审核结果,为了保证上线时间,这里先不做查询
							if("success".equals(sendStatus) && PrjBscInfoConstant.PRJ_INS_CODE_ZS.equals(prjBscInfoVO.getInsCode())){
								view.addObject("auditResult", "pass");//审核结果
								view.addObject("auditDesc", "");//审核描述
							}
							
							//工行/中建投 查询结果
							if("success".equals(sendStatus) && 
									(PrjBscInfoConstant.PRJ_INS_CODE_JIC.equals(prjBscInfoVO.getInsCode())
									 || PrjBscInfoConstant.PRJ_INS_CODE_ICBC.equals(prjBscInfoVO.getInsCode()))){
								PrjPrdPaySchMQueryCondition pppsmQC = new PrjPrdPaySchMQueryCondition();
								pppsmQC.setPrjId(Long.valueOf(projectId));
                                pppsmQC.setPaySchTypCd(PrjPrdPaySchMConstant.PAY_SCH_TYP_CD_WS);
                                BaseLogUtils.info(logger, "toAdditionalInfoPage", "===查询支付表信息Start===prjId:"+projectId, CurrentThreadContext.getCurrentUserName());
								List<PrjPrdPaySchMVO> prjPrdPaySchMVOList = this.prjPrdPaySchMService.searchList(pppsmQC);
								BaseLogUtils.info(logger, "toAdditionalInfoPage", "===查询支付表信息End===prjId:"+projectId+",prjPrdPaySchMVOList:"+JSON.toJSONString(prjPrdPaySchMVOList), CurrentThreadContext.getCurrentUserName());
								if(CollectionUtils.isNotEmpty(prjPrdPaySchMVOList)){
									List<Long> exclusivePrjPaySchIds = new ArrayList<Long>();
									//过滤掉上装支付表
									PrjPrdBscInfoQueryCondition ppbiQC = new PrjPrdBscInfoQueryCondition();
						    		ppbiQC.setPrjId(Long.valueOf(projectId));
						    		BaseLogUtils.info(logger, "toAdditionalInfoPage", "=查询项目产品信息Start=prjId:"+projectId);
						    		List<PrjPrdBscInfoVO> prjPrdBscInfoVOList = this.prjPrdBscInfoService.searchList(ppbiQC);
						    		BaseLogUtils.info(logger, "toAdditionalInfoPage", "=查询项目产品信息End=prjId:"+projectId+",prjPrdBscInfoVOList:"+JSON.toJSONString(prjPrdBscInfoVOList));
						    		List<Long> exclusivePrjPrdIds = new ArrayList<Long>();
						    		if(CollectionUtils.isNotEmpty(prjPrdBscInfoVOList)){
						    			for (PrjPrdBscInfoVO prjPrdBscInfoVO : prjPrdBscInfoVOList) {
											if(CarStyleConstant.PRD_TYP_8.equals(prjPrdBscInfoVO.getPrdTypCd())){
												exclusivePrjPrdIds.add(prjPrdBscInfoVO.getId());
											}
										}
						    		}
						    		PrjPrdDtlQueryCondition ppdQC = new PrjPrdDtlQueryCondition();
			                		ppdQC.setPrjId(Long.valueOf(projectId));
			                		BaseLogUtils.info(logger, "toAdditionalInfoPage", "=查询项目产品明细Start=prjId:"+projectId);
			                		List<PrjPrdDtlVO> prjPrdDtlVOList = this.prjPrdDtlService.selectList(ppdQC);
			                		BaseLogUtils.info(logger, "toAdditionalInfoPage", "=查询项目产品明细End=prjId:"+projectId+",prjPrdDtlDTOList:"+JSON.toJSONString(prjPrdDtlVOList));
			                		if(CollectionUtils.isNotEmpty(prjPrdDtlVOList)){
			                			for (PrjPrdDtlVO prjPrdDtlVO : prjPrdDtlVOList) {
											if(exclusivePrjPrdIds.contains(prjPrdDtlVO.getPrjPrdId())){
												exclusivePrjPaySchIds.add(prjPrdDtlVO.getPaySchId());
											}
										}
			                		}
									List<Long> paySchIds = new ArrayList<Long>();
									for (PrjPrdPaySchMVO prjPrdPaySchMVO : prjPrdPaySchMVOList) {
										if(exclusivePrjPaySchIds.contains(prjPrdPaySchMVO.getId())){
											continue;
										}
										paySchIds.add(prjPrdPaySchMVO.getId());
									}
									BaseLogUtils.info(logger, "toAdditionalInfoPage", "===查询征信请求结果Start===prjId:"+projectId+",insId:"+prjBscInfoVO.getFundRasInsId()+",insCd:"+prjBscInfoVO.getInsCode()+",paySchIds:"+JSON.toJSONString(paySchIds), CurrentThreadContext.getCurrentUserName());
									cmm.mid.core.framework.dto.MessageDTO<CreditDTO> queryCredit = this.tripartiteApi.queryCredit(prjBscInfoVO.getFundRasInsId(), prjBscInfoVO.getInsCode(), prjBscInfoVO.getId(), paySchIds);
									BaseLogUtils.info(logger, "toAdditionalInfoPage", "===查询征信请求结果End===prjId:"+projectId+",queryCredit:"+JSON.toJSONString(queryCredit), CurrentThreadContext.getCurrentUserName());
									if(null!=queryCredit && queryCredit.isSuccess()){
										CreditDTO creditDTO = queryCredit.getData();
										if(null!=creditDTO){
											view.addObject("auditResult", creditDTO.getAuditResult());//审核结果
											view.addObject("auditDesc", creditDTO.getAuditDesc());//审核描述
										}
									}
								}
						}
					}
				}
				Long prjId = Long.valueOf(projectId);
                if (PrjBscInfoConstant.PRJ_TYP_CD_CDDYWYQ.equals(prjBscInfoVO.getPrjTypCd()) && null != yqFormerPrjId) {
                    prjId = yqFormerPrjId;
                }
				//风险标记开始
				List<Long> prjPrdDtlIdList = new ArrayList<Long>();
				PrjPrdDtlQueryCondition dtlQC = new PrjPrdDtlQueryCondition();
				dtlQC.setPrjId(Long.valueOf(prjId));
        		List<PrjPrdDtlVO> dtlList = this.prjPrdDtlService.selectList(dtlQC);
        		if(CollectionUtils.isNotEmpty(dtlList)){
        			for (PrjPrdDtlVO dtl : dtlList) {
						if(!prjPrdDtlIdList.contains(dtl.getId())){
							prjPrdDtlIdList.add(dtl.getId());
						}
					}
        		}
				Map<String,String> result = this.rskCstSignLogService.searchRskResInfo(prjBscInfoVO.getCstId(),Long.valueOf(prjId),prjPrdDtlIdList);
				if(MapUtils.isNotEmpty(result)){
					//客户风险标记
					view.addObject("rskCstSignDesc",result.get("rskCstSignDesc"));
					//设备风险标记
					view.addObject("rskProdSignDesc", result.get("rskProdSignDesc"));
					//担保人风险标记
					view.addObject("rskGuarSignDesc", result.get("rskGuarSignDesc"));
					//vin风险标记
					view.addObject("rskVinSignDesc",result.get("rskVinSignDesc"));
					//承租人手机号风险标记
					view.addObject("rskCstMpSignDesc", result.get("rskCstMpSignDesc"));
					//挂靠公司风险标记
					view.addObject("rskLnkSignDesc", result.get("rskLnkSignDesc"));
					//供应商风险标记
					view.addObject("rskSplSignDesc", result.get("rskSplSignDesc"));
				}else{
					//客户风险标记
					view.addObject("rskCstSignDesc","");
					//设备风险标记
					view.addObject("rskProdSignDesc", "");
					//担保人风险标记
					view.addObject("rskGuarSignDesc", "");
					//vin风险标记
					view.addObject("rskVinSignDesc","");
					//承租人手机号风险标记
					view.addObject("rskCstMpSignDesc", "");
					//挂靠公司风险标记
					view.addObject("rskLnkSignDesc", "");
					//供应商风险标记
					view.addObject("rskSplSignDesc", "");
				}
			} catch (Exception e) {
				BaseLogUtils.info(logger, "toAdditionalInfoPage", "===查询征信异常===prjId:"+projectId, CurrentThreadContext.getCurrentUserName());
				e.printStackTrace();
			}
			
			//查询项目产品信息 取产品类型传到页面 刷新车辆运营动态字段
			String prdTypCd = "";
			PrjPrdBscInfoQueryCondition prjPrdQc = new PrjPrdBscInfoQueryCondition();
			if(StringUtils.isNotEmpty(projectId)){
				prjPrdQc.setPrjId(Long.valueOf(projectId));
			}
			List<PrjPrdBscInfoVO> prjPrdBscInfoVOList = this.prjPrdBscInfoService.searchList(prjPrdQc);

			//查询项目产品明细
			PrjPrdDtlQueryCondition condition = new PrjPrdDtlQueryCondition();
			if(StringUtils.isNotEmpty(projectId)){
				condition.setPrjId(Long.valueOf(projectId));
			}
			List<PrjPrdDtlVO> prjPrdDtlVOList = this.prjPrdDtlService.selectList(condition);
			List<String> styleIdList = new ArrayList();//车辆型号
			List<Long> lnkCompNmList = new ArrayList();//挂靠公司名称
			if (CollectionUtils.isNotEmpty(prjPrdBscInfoVOList)){
				for (PrjPrdDtlVO prjPrdDtlVO : prjPrdDtlVOList) {
					String prdMdl = prjPrdDtlVO.getPrdMdl();
					if (CollectionUtils.isEmpty(styleIdList)||(!styleIdList.contains(prdMdl))){
						styleIdList.add(prdMdl);
					}
					if (StringUtils.isNotEmpty(prjPrdDtlVO.getLnkCompId())){
						Long lnkCompId = prjPrdDtlVO.getLnkCompId();
						if (CollectionUtils.isEmpty(lnkCompNmList) || (!lnkCompNmList.contains(lnkCompId))){
							lnkCompNmList.add(lnkCompId);
						}
					}else if(StringUtils.isEmpty(prjPrdDtlVO.getLnkCompId()) && (!lnkCompNmList.contains(0L))){
						lnkCompNmList.add(0L);
					}
				}
			}

			if(CollectionUtils.isNotEmpty(prjPrdBscInfoVOList)){
				prdTypCd = prjPrdBscInfoVOList.get(0).getPrdTypCd();
				// prjPrdDtlList = prjPrdBscInfoVOList.get(0).getPrjPrdDtlList();    // 产品明细
			}
			boolean styleIds = styleIdList.size()>1;
			boolean lnkCompNms = lnkCompNmList.size()>1;
			view.addObject("prdTypCd", prdTypCd);
			view.addObject("styleIds", styleIds);
			view.addObject("lnkCompNms", lnkCompNms);

			/** REQ-3674 上牌 抵押信息 (车抵贷（线下）、二手车交易贷) start */
			/*if(prjBscInfoVO.getPrjTypCd()!=null && ("CDDYWUL".equals(prjBscInfoVO.getPrjTypCd()) || "ESCJYD".equals(prjBscInfoVO.getPrjTypCd()))){
				//2017-3-31 String escFlag = "0";
				String escFlag = "1";
				PrjPrdDtlQueryCondition prjPrdDtlQc = new PrjPrdDtlQueryCondition();
				if(StringUtils.isNotEmpty(projectId)){
					prjPrdDtlQc.setPrjId(Long.valueOf(projectId));
				}
				List<PrjPrdDtlVO> prjPrdDtlVOs = this.prjPrdDtlService.selectList(prjPrdDtlQc);
				if(prjPrdDtlVOs != null && CollectionUtils.isNotEmpty(prjPrdDtlVOs)) {
					List<Map<String, Object>> prjPrdLicInfoList = new ArrayList<>();
					for (PrjPrdDtlVO prjPrdDtlVO : prjPrdDtlVOs) {
						Map<String, Object> prjPrdLicInfoView = new HashMap<>();
						Long prjPrdDtlId = prjPrdDtlVO.getId();
						String isExistSp = "";
						String spState = "0";
						if(StringUtils.isNotEmpty(prjPrdDtlId)){
							prjPrdLicInfoView.put("prjPrdDtlId", prjPrdDtlId); // 项目产品信息id
							//查询上牌信息
							BaseLogUtils.info(logger, "toAdditionalInfoPage", "===查询上牌信息Start===prjPrdDtlId:"+prjPrdDtlId, CurrentThreadContext.getCurrentUserName());
							PrjPrdLicInfoVO prjPrdLicInfoVO = this.prjPrdLicInfoService.selectById(prjPrdDtlId);
							BaseLogUtils.info(logger, "toAdditionalInfoPage", "===查询上牌信息End===prjPrdDtlId:"+prjPrdDtlId+",prjPrdLicInfoVO:"+JSON.toJSONString(prjPrdLicInfoVO), CurrentThreadContext.getCurrentUserName());
							if(null==prjPrdLicInfoVO){
								isExistSp = "0";
							}else{
								isExistSp = "1";
							}
							if(null!=prjPrdLicInfoVO && FlowConstant.FLOW_CHECK_STATE_PASS.equals(prjPrdLicInfoVO.getAudStsCd())){
								spState = "1";
							}
                            prjPrdLicInfoView.put("vehNo", prjPrdLicInfoVO.getVehNo()); // 车牌号
						}
						prjPrdLicInfoView.put("spState", spState);			// 是否已上牌 1已上牌
						prjPrdLicInfoView.put("isExistSp", isExistSp);		// 是否存在上牌信息 1存在
						String dyFlag = request.getParameter("dyFlag"); //抵押
						if(StringUtils.isNotEmpty(dyFlag)){
							dyFlag = dyFlag.replace("\'", "");
						}else{
							dyFlag = "0";
						}

						String isExistDy = "";
						String dyState = "0";
						if(StringUtils.isNotEmpty(prjPrdDtlId)){
							//查询抵押信息
							BaseLogUtils.info(logger, "toAdditionalInfoPage", "===查询抵押信息Start===prjPrdDtlId:"+prjPrdDtlId, CurrentThreadContext.getCurrentUserName());
							PrjPrdMtgVO prjPrdMtgVO = this.prjPrdMtgService.selectById(prjPrdDtlId);
							BaseLogUtils.info(logger, "toAdditionalInfoPage", "===查询抵押信息End===prjPrdDtlId:"+prjPrdDtlId+",prjPrdMtgVO:"+JSON.toJSONString(prjPrdMtgVO), CurrentThreadContext.getCurrentUserName());
							if(null==prjPrdMtgVO){
								isExistDy = "0";
							}else{
								isExistDy = "1";
							}
							if(null!=prjPrdMtgVO && PrjPrdMtgConstant.CODE_GUAR_STS_CD_MTG.equals(prjPrdMtgVO.getGuarStsCd())){
								dyState = "1";
							}
                            prjPrdLicInfoView.put("recNo", prjPrdMtgVO.getRecNo()); // REC_NO
						}
						prjPrdLicInfoView.put("dyState", dyState);  	// 是否已抵押 1 已抵押
						prjPrdLicInfoView.put("dyFlag", dyFlag);    	// 查看/编辑  0/1
						prjPrdLicInfoView.put("isExistDy", isExistDy);	// 是否存在抵押信息 1 存在
						prjPrdLicInfoList.add(prjPrdLicInfoView);
					}
					view.addObject("prjPrdLicInfoList", prjPrdLicInfoList);
					view.addObject("escFlag", escFlag);  // 显示抵押信息开关 1显示
				}
			}*/
			/** 上牌 抵押信息   end */
			
			//根据所查到的产品类型 查询映射表配置 获得哪些产品类型有数据需要实例化
			List<String> tCodeList = new ArrayList<String>();
			if(CollectionUtils.isNotEmpty(prjPrdBscInfoVOList)){
				List<String> sCodeList = new ArrayList<String>();
				for (PrjPrdBscInfoVO prjPrdBscInfoVO : prjPrdBscInfoVOList) {
					if(!sCodeList.contains(prjPrdBscInfoVO.getPrdTypCd())){
						sCodeList.add(prjPrdBscInfoVO.getPrdTypCd());
					}
				}
				if(CollectionUtils.isNotEmpty(sCodeList)){
					SysCdMapDQueryCondition cdMapDQC = new SysCdMapDQueryCondition();
					cdMapDQC.setSysCd(CurrentThreadContext.getCurrentSysCd());
					cdMapDQC.setOrgCd(CurrentThreadContext.getCurrentOrgCd());
					cdMapDQC.setmTypCd("M2006");
					cdMapDQC.setsCodeList(sCodeList);
					List<SysCdMapDDTO> sysCdMapDList = this.sysCdMapApiService.searchSysCdMapDWithTargetList(cdMapDQC);
					if(CollectionUtils.isNotEmpty(sysCdMapDList)){
						for (SysCdMapDDTO sysCdMapDDTO : sysCdMapDList) {
							if(!tCodeList.contains(sysCdMapDDTO.getTCode())){
								tCodeList.add(sysCdMapDDTO.getTCode());
							}
						}
					}
				}
			}
			StringBuffer tCodeString = new StringBuffer();
			if(CollectionUtils.isNotEmpty(tCodeList)){
				for (String string : tCodeList) {
					tCodeString.append(string+";");
				}
				view.addObject("tCodeString", tCodeString.substring(0, tCodeString.length()-1).toString());
			}
			
			//设备大类
			List<KeyValueVO> equCategoryCdList = this.prjBscInfoService.searchEquCategoryCdList(CurrentThreadContext.getCurrentSysCd(), prjBscInfoVO.getBuOrgCd());
			view.addObject("equCategoryCdListJSON", JSON.toJSONString(equCategoryCdList));
			//放款方式
			List<KeyValueVO> payWayCdList = this.prjBscInfoService.searchPayWayCdList(CurrentThreadContext.getCurrentSysCd(), prjBscInfoVO.getBuOrgCd());
			view.addObject("payWayCdListJSON", JSON.toJSONString(payWayCdList));
			//车辆级别
			List<KeyValueVO> carLevelCdList = this.prjBscInfoService.searchCarLevelCdList();
			view.addObject("carLevelCdListJSON", JSON.toJSON(carLevelCdList));
			//农机设备大类
			List<KeyValueVO> farmEquCategoryCdList = this.prjBscInfoService.searchFarmEquCategoryCdList();
			view.addObject("farmEquCategoryCdListJSON", JSON.toJSON(farmEquCategoryCdList));

			//收入方式
			List<KeyValueVO> profitCdList = this.audReturnVisitService.searchProfitCdList(CurrentThreadContext.getCurrentSysCd(), prjBscInfoVO.getBuOrgCd());
			view.addObject("profitCdList", profitCdList);
			//运营年限/本地生活年限
			List<KeyValueVO> bizExpList = this.audReturnVisitService.searchBizExpList();
			view.addObject("bizExpList", bizExpList);
			//主货物大类
			List<KeyValueVO> mainGdsTypCdList = this.audCreditInfoService.searchGoodsTypListByLvl("1");
			view.addObject("mainGdsTypCdList", mainGdsTypCdList);
			//货物来源
			List<KeyValueVO> goodsResList = this.audReturnVisitService.searchGoodsResList();
			view.addObject("goodsResList", goodsResList);
			//主货物结算方式
			List<KeyValueVO> gdsStlWayCdList = this.audReturnVisitService.searchGdsStlWayCdList();
			view.addObject("gdsStlWayCdList", gdsStlWayCdList);
			//司机情况
			List<KeyValueVO> driverList = this.audReturnVisitService.searchDriverList();
			view.addObject("driverList", driverList);
			//第二还款来源
			List<KeyValueVO> secondPayResCdList = this.audReturnVisitService.searchSecondPayResCdList();
			view.addObject("secondPayResCdList", secondPayResCdList);
			
			//是否
			List<KeyValueVO> yesOrNoCdList = this.audStandingBookService.searchYesOrNoCdList();
			view.addObject("yesOrNoCdList", yesOrNoCdList);
			//流程审核意见
			List<KeyValueVO> processOpinionCdList = this.audStandingBookService.searchProcessOpinionCdList();
			view.addObject("processOpinionCdList", processOpinionCdList);
			//客户经理评级
			List<KeyValueVO> cstMgrLvlCdList = this.audInterviewInfoService.searchCstMgrLvlCdList();
			view.addObject("cstMgrLvlCdList", cstMgrLvlCdList);
			//首付款来源
			List<KeyValueVO> firstPayResCdList = this.audInterviewInfoService.searchFirstPayResCdList();
			view.addObject("firstPayResCdList", firstPayResCdList);
			//风控评级
			List<KeyValueVO> riskCtrlLvlCdList = this.audInterviewInfoService.searchRiskCtrlLvlCdList();
			view.addObject("riskCtrlLvlCdList", riskCtrlLvlCdList);
			//是否团单
			List<KeyValueVO> isGrpList = this.capPayInfoService.searchIsGrpList();
			view.addObject("isGrpList", isGrpList);
			//风险提示
            List<KeyValueVO> riskTipsList = sysDictionaryApiService.getKvList(PrjMapRiskConstant.MAP_RISK_TIPS_CD, CurrentThreadContext.getCurrentSysCd(), CurrentThreadContext.getCurrentOrgCd());
            view.addObject("riskTipsList", JSONArray.fromObject(riskTipsList));
            //贷前风险标记
			List<KeyValueVO> preLoanRiskFlagCdList = sysDictionaryApiService.getKvList(DictionaryConstant.PRE_LOAN_RISK_FLAG_CD, CurrentThreadContext.getCurrentSysCd(), CurrentThreadContext.getCurrentOrgCd());
			view.addObject("preLoanRiskFlagCdList", preLoanRiskFlagCdList);
			//问题记录
			List<KeyValueVO> problemRecordCdList = this.sysDictionaryApiService.getKvList(AudStandingBookConstant.PROBLEM_RECORD_CD, CurrentThreadContext.getCurrentSysCd(), CurrentThreadContext.getCurrentOrgCd());
			view.addObject("problemRecordCdList", problemRecordCdList);
			//是否呈报
			List<KeyValueVO> submitCdList = this.sysDictionaryApiService.getKvList(AudStandingBookConstant.SUBMIT_CD, CurrentThreadContext.getCurrentSysCd(), CurrentThreadContext.getCurrentOrgCd());
			view.addObject("submitCdList", submitCdList);
			//业务实质
			List<KeyValueVO> bussEssenceCdList = this.sysDictionaryApiService.getKvList(AudStandingBookConstant.BUSS_ESSENCE_CD, CurrentThreadContext.getCurrentSysCd(), CurrentThreadContext.getCurrentOrgCd());
			view.addObject("bussEssenceCdList", bussEssenceCdList);
			//客户评级-经验
			List<KeyValueVO> experienceCdList = this.sysDictionaryApiService.getKvList(AudStandingBookConstant.EXPERIENCE_CD, CurrentThreadContext.getCurrentSysCd(), CurrentThreadContext.getCurrentOrgCd());
			view.addObject("experienceCdList", experienceCdList);
			//客户评级-货源
			List<KeyValueVO> goodsSourceCdList = this.sysDictionaryApiService.getKvList(AudStandingBookConstant.GOODS_SOURCE_CD, CurrentThreadContext.getCurrentSysCd(), CurrentThreadContext.getCurrentOrgCd());
			view.addObject("goodsSourceCdList", goodsSourceCdList);
			//拆单/顶名嫌疑
			List<KeyValueVO> suspicionCdList = this.sysDictionaryApiService.getKvList(AudStandingBookConstant.SUSPICION_CD, CurrentThreadContext.getCurrentSysCd(), CurrentThreadContext.getCurrentOrgCd());
			view.addObject("suspicionCdList", suspicionCdList);
			//还款能力
			List<KeyValueVO> repaymentCapacityCdList = this.sysDictionaryApiService.getKvList(AudStandingBookConstant.REPAYMENT_CAPACITY_CD, CurrentThreadContext.getCurrentSysCd(), CurrentThreadContext.getCurrentOrgCd());
			view.addObject("repaymentCapacityCdList", repaymentCapacityCdList);
			//配合度
			List<KeyValueVO> complianceCdList = this.sysDictionaryApiService.getKvList(AudStandingBookConstant.COMPLIANCE_CD, CurrentThreadContext.getCurrentSysCd(), CurrentThreadContext.getCurrentOrgCd());
			view.addObject("complianceCdList", complianceCdList);

            /**
             * 判断是否信审节点
             * 判断签收标识
             * 查询是否已经发送过短信给承租人(根据流程实例ID和模板Code查询)
             */
			try {
				if(StringUtils.isNotEmpty(isDetail) && String.valueOf(BaseConstant.IS_YESNO_NO).equals(isDetail)){
					String isSign = request.getParameter("isSign");
					if(StringUtils.isNotEmpty(isSign) && String.valueOf(BaseConstant.IS_YESNO_YES).equals(isSign)){
						SysSmsLogQueryCondition qc = new SysSmsLogQueryCondition();
						qc.setTemplatesCode(SysConTemplatesConstant.SMS_CREDIT_AUDIT_SIGN);
						qc.setCustomField(proIntId);
						BaseLogUtils.info(logger, "toAdditionalInfoPage", "===查询发送短信日志Start===qc:"+JSON.toJSONString(qc));
						List<SysSmsLogDTO> sysSmsLogList = this.sysSmsApiService.searchSysSmsLogList(qc);
						BaseLogUtils.info(logger, "toAdditionalInfoPage", "===查询发送短信日志End===sysSmsLogList:"+JSON.toJSONString(sysSmsLogList));
						if(CollectionUtils.isEmpty(sysSmsLogList)){
							if(null!=prjBscInfoVO){
								String cstNm = prjBscInfoVO.getCstNm();//客户名称
								Long cstId = prjBscInfoVO.getCstId();
								String cstMp = "";//客户手机号
								if(StringUtils.isNotEmpty(cstId)){
									CstNpBscInfoQueryCondition npQC = new CstNpBscInfoQueryCondition();
									List<Long> cstIdList = new ArrayList<Long>();
									cstIdList.add(cstId);
									npQC.setIdList(cstIdList);
									BaseLogUtils.info(logger, "toAdditionalInfoPage", "===查询自然人客户信息Start===npQC:"+JSON.toJSONString(npQC));
									List<CstNpBscInfoDTO> cstNpBscInfoList = this.customerQueryApiService.searchCstNpBscInfoList(npQC);
									BaseLogUtils.info(logger, "toAdditionalInfoPage", "===查询自然人客户信息End===cstNpBscInfoList:"+JSON.toJSONString(cstNpBscInfoList));
									if(CollectionUtils.isNotEmpty(cstNpBscInfoList)){
										CstNpBscInfoDTO cstNpBscInfoDTO = cstNpBscInfoList.get(0);
										if(null!=cstNpBscInfoDTO){
											String mp1 = cstNpBscInfoDTO.getMp1();
											String mp2 = cstNpBscInfoDTO.getMp2();
											if(StringUtils.isNotEmpty(mp1)){
												cstMp = mp1;
											}else if(StringUtils.isNotEmpty(mp2)){
												cstMp = mp2;
											}
										}
									}
								}
								//发送短信
								if(StringUtils.isNotEmpty(cstMp) && StringUtils.isNotEmpty(cstNm)){
									Map<String, String> contextParams = new HashMap<String, String>();//短信内容参数
									contextParams.put("客户姓名", cstNm);
									//发送短信对象
									SendContextDTO sendContextDTO = new SendContextDTO();
									sendContextDTO.setPhone(cstMp);
									sendContextDTO.setTemplatesCode(SysConTemplatesConstant.SMS_CREDIT_AUDIT_SIGN);
									sendContextDTO.setContextParams(contextParams);
									sendContextDTO.setCreateId(CurrentThreadContext.getCurrentUserId());
									sendContextDTO.setCreateName(CurrentThreadContext.getCurrentUserName());
									sendContextDTO.setCreateDate(new Date());
									sendContextDTO.setCustomField(proIntId);
									BaseLogUtils.info(logger, "toAdditionalInfoPage", "===发送短信Start===sendContextDTO:"+JSON.toJSONString(sendContextDTO));
									DataResultDTO sendSmsResultDTO = this.sysSmsApiService.sendSms(sendContextDTO);
									BaseLogUtils.info(logger, "toAdditionalInfoPage", "===发送短信End===sendSmsResultDTO:"+JSON.toJSONString(sendSmsResultDTO));
								}
							}
						}
					}
					//发短信给客户经理
					if(StringUtils.isNotEmpty(isSign) && String.valueOf(BaseConstant.IS_YESNO_YES).equals(isSign)){
						SysSmsLogQueryCondition qc = new SysSmsLogQueryCondition();
						qc.setTemplatesCode(SysConTemplatesConstant.SMS_CREDIT_AUDIT_SIGN_MGR);
						qc.setCustomField(proIntId);
						BaseLogUtils.info(logger, "toAdditionalInfoPage", "===查询发送短信日志Start===qc:"+JSON.toJSONString(qc));
						List<SysSmsLogDTO> sysSmsLogList = this.sysSmsApiService.searchSysSmsLogList(qc);
						BaseLogUtils.info(logger, "toAdditionalInfoPage", "===查询发送短信日志End===sysSmsLogList:"+JSON.toJSONString(sysSmsLogList));
						if(CollectionUtils.isEmpty(sysSmsLogList)){
							if(null!=prjBscInfoVO){
								String cstNm = prjBscInfoVO.getCstNm();//客户名称
								String cstMgrNm = prjBscInfoVO.getCstMgrNm();//客户经理名称
								//发送短信
								if(StringUtils.isNotEmpty(mp) && StringUtils.isNotEmpty(cstMgrNm) && StringUtils.isNotEmpty(cstNm) && StringUtils.isNotEmpty(taskNm)){
									Map<String, String> contextParams = new HashMap<String, String>();//短信内容参数
									contextParams.put("客户经理名称", cstMgrNm);
									contextParams.put("客户名称", cstNm);
									contextParams.put("节点名称", taskNm);
									//发送短信对象
									SendContextDTO sendContextDTO = new SendContextDTO();
									sendContextDTO.setPhone(mp);
									sendContextDTO.setTemplatesCode(SysConTemplatesConstant.SMS_CREDIT_AUDIT_SIGN_MGR);
									sendContextDTO.setContextParams(contextParams);
									sendContextDTO.setCreateId(CurrentThreadContext.getCurrentUserId());
									sendContextDTO.setCreateName(CurrentThreadContext.getCurrentUserName());
									sendContextDTO.setCreateDate(new Date());
									sendContextDTO.setCustomField(proIntId);
									BaseLogUtils.info(logger, "toAdditionalInfoPage", "===发送短信Start===sendContextDTO:"+JSON.toJSONString(sendContextDTO));
									DataResultDTO sendSmsResultDTO = this.sysSmsApiService.sendSms(sendContextDTO);
									BaseLogUtils.info(logger, "toAdditionalInfoPage", "===发送短信End===sendSmsResultDTO:"+JSON.toJSONString(sendSmsResultDTO));
								}
							}
						}
					}
				}
			} catch (Exception e) {
				BaseLogUtils.info(logger, "sendMsgForCreditAuditPass", "===发送短信失败===Detail:"+e.getMessage());
				BaseLogUtils.error(logger, "-", "异常", e);
			}
			//厂商业务方案政策列表
			List<KeyValueVO> policyTypCdList = this.sysDictionaryApiService.getKvList(DictionaryConstant.CODE_QUAT_POLICY_TYP_CD,CurrentThreadContext.getCurrentSysCd() , CurrentThreadContext.getCurrentOrgCd());
			view.addObject("policyTypCdList",policyTypCdList);
		} catch (Exception e) {
			BaseLogUtils.info(logger, "sendMsgForCreditAuditPass", "=跳转流程附加信息页面异常=projectId:"+projectId+","+e.getMessage());
			e.printStackTrace();
		}
		
		return view;
	}
	/**
	 * 到流程附加信息页面 - 汽车金融
	 */
	@RequestMapping(value = "/toCarBizAdditionalInfoPage.do", method = { RequestMethod.GET, RequestMethod.POST })
	public ModelAndView toCarBizAdditionalInfoPage(HttpServletRequest request, HttpServletResponse response) {
		String projectId = request.getParameter("projectId");//项目ID
		String proIntId = request.getParameter("processInstanceId");//流程实例ID
		String taskId = request.getParameter("taskId");//任务ID
		String taskDefKey = request.getParameter("taskDefKey");//任务KEY
		String isDetail = request.getParameter("isDetail");//1:其他节点 0:信审节点
		String taskNm = request.getParameter("taskNm");//任务名称
		String ctrlKey = request.getParameter("ctrlKey");//资料标识//控制键 1.可上传、下载、删除 2.可验证 3.不可操作
		String isMdfQuatPrps = request.getParameter("isMdfQuatPrps");//可修改项目报价 VIN 
		String isGetReport = request.getParameter("isGetReport");//获取车三百报告 
		
		ModelAndView view = new ModelAndView("project/additionalInfo/carAudNodeAdditionalInfo");
		view.addObject("projectId", projectId);
		view.addObject("proIntId", proIntId);
		view.addObject("taskId", taskId);
		view.addObject("taskDefKey", taskDefKey);
		view.addObject("taskNm", taskNm);
		view.addObject("isDetail", isDetail);
		view.addObject("ctrlKey", ctrlKey);
		view.addObject("isMdfQuatPrps", isMdfQuatPrps);
		view.addObject("isGetReport", isGetReport);

		// 信审员初审，新能源汽车快捷报单流程 三方资管城配业务工行评审流程 重卡城配项目评审流程 信审员审核
		if((StringUtils.isNotEmpty(taskNm) && (taskNm.indexOf("信审") != -1 && taskNm.indexOf("初审") != -1))
				|| "FLOW_00000001_001_001_001".equals(taskDefKey) || "FLOW_00000013_001_002_001".equals(taskDefKey) || "FLOW_00000001_001_004_001".equals(taskDefKey)) {
			view.addObject("fromCAFlag", true);
		}

		try {
			//查询项目信息
			PrjBscInfoVO prjBscInfoVO = null;
			String mp = "";//客户经理手机号
			if(StringUtils.isNotEmpty(projectId)){
				prjBscInfoVO = this.prjBscInfoService.selectById(Long.valueOf(projectId));
				if(null!=prjBscInfoVO && StringUtils.isNotEmpty(prjBscInfoVO.getCstMgrId())){
					SysUsrVO sysUsrVO = this.sysUsrService.selectById(prjBscInfoVO.getCstMgrId(), CurrentThreadContext.getCurrentSysCd());
					if(null!=sysUsrVO && StringUtils.isNotBlank(sysUsrVO.getMp())){
						mp = sysUsrVO.getMp();
					}
				}
			}
			view.addObject("mp", mp);
			//查询承租人客户类型
			String cstTypCd  = "";
			if(null!=prjBscInfoVO && null!=prjBscInfoVO.getCstId()){
				try {
					CstBscInfoVO cstBscInfoVO = this.cstBscInfoService.selectDetailById(prjBscInfoVO.getCstId());
					cstTypCd = cstBscInfoVO.getCstTypCd();
				} catch (Exception e) {
					BaseLogUtils.info(logger, "searchPrjAuditFlowByPrjId", "查询承租人信息失败.DETAIL:"+e.getMessage());
				}
			}
			view.addObject("cstTypCd", cstTypCd);
			
			/*//查询项目产品信息 取产品类型传到页面 刷新车辆运营动态字段
			String prdTypCd = "";
			PrjPrdBscInfoQueryCondition prjPrdQc = new PrjPrdBscInfoQueryCondition();
			if(StringUtils.isNotEmpty(projectId)){
				prjPrdQc.setPrjId(Long.valueOf(projectId));
			}
			List<PrjPrdBscInfoVO> prjPrdBscInfoVOList = this.prjPrdBscInfoService.searchList(prjPrdQc);
			if(CollectionUtils.isNotEmpty(prjPrdBscInfoVOList)){
				prdTypCd = prjPrdBscInfoVOList.get(0).getPrdTypCd();
			}
			view.addObject("prdTypCd", prdTypCd);
			//根据所查到的产品类型 查询映射表配置 获得哪些产品类型有数据需要实例化
			List<String> tCodeList = new ArrayList<String>();
			if(CollectionUtils.isNotEmpty(prjPrdBscInfoVOList)){
				List<String> sCodeList = new ArrayList<String>();
				for (PrjPrdBscInfoVO prjPrdBscInfoVO : prjPrdBscInfoVOList) {
					if(!sCodeList.contains(prjPrdBscInfoVO.getPrdTypCd().substring(0, 3))){
						sCodeList.add(prjPrdBscInfoVO.getPrdTypCd().substring(0, 3));
					}
				}
				if(CollectionUtils.isNotEmpty(sCodeList)){
					SysCdMapDQueryCondition cdMapDQC = new SysCdMapDQueryCondition();
					cdMapDQC.setSysCd(CurrentThreadContext.getCurrentSysCd());
					cdMapDQC.setOrgCd(CurrentThreadContext.getCurrentOrgCd());
					cdMapDQC.setmTypCd("M0006");
					cdMapDQC.setsCodeList(sCodeList);
					List<SysCdMapDDTO> sysCdMapDList = this.sysCdMapApiService.searchSysCdMapDWithTargetList(cdMapDQC);
					if(CollectionUtils.isNotEmpty(sysCdMapDList)){
						for (SysCdMapDDTO sysCdMapDDTO : sysCdMapDList) {
							if(!tCodeList.contains(sysCdMapDDTO.getTCode())){
								tCodeList.add(sysCdMapDDTO.getTCode());
							}
						}
					}
				}
			}
			StringBuffer tCodeString = new StringBuffer();
			if(CollectionUtils.isNotEmpty(tCodeList)){
				for (String string : tCodeList) {
					tCodeString.append(string+";");
				}
				view.addObject("tCodeString", tCodeString.substring(0, tCodeString.length()-1).toString());
			}*/
			
			//车辆级别
			List<KeyValueVO> carLevelCdList = this.prjBscInfoService.searchCarLevelCdList();
			view.addObject("carLevelCdListJSON", JSON.toJSON(carLevelCdList));
			
			//是否
			List<KeyValueVO> yesOrNoCdList = this.audStandingBookService.searchYesOrNoCdList();
			view.addObject("yesOrNoCdList", yesOrNoCdList);
			
			//行业类别industryTypeCd()
			List<KeyValueVO> industryTypeCdList = this.audStandingBookService.searchIndustryTypeCdList();
			view.addObject("industryTypeCdList", industryTypeCdList);

			//贷前风险标记
			List<KeyValueVO> preLoanRiskFlagCdList = sysDictionaryApiService.getKvList(DictionaryConstant.PRE_LOAN_RISK_FLAG_CD, CurrentThreadContext.getCurrentSysCd(), CurrentThreadContext.getCurrentOrgCd());
			view.addObject("preLoanRiskFlagCdList", preLoanRiskFlagCdList);
			
			//工行卡贷征信  - by yaoxiurong
			String showCreditResult = request.getParameter("showCreditResult");//信审节点查询征信结果标识
			view.addObject("showCreditResult", showCreditResult);
			view.addObject("prjTypCd", prjBscInfoVO.getPrjTypCd());
			if("1".equals(showCreditResult) && PrjBscInfoConstant.PRJ_TYP_CD_GHKD.equals(prjBscInfoVO.getPrjTypCd())){
				
				String sendStatus = "";//征信发送状态
				InfTransLogQueryCondition itlQC = new InfTransLogQueryCondition();
				itlQC.setAction(cmm.mid.core.framework.constant.tripartite.InterfaceConstants.Action.submitCredit.key());//提交征信查询
				itlQC.setPrjId(Long.valueOf(projectId));
				//itlQC.setPaySchId(vo.getPaySchId());
				itlQC.setFundRasInsId(171225242000321L);
				BaseLogUtils.info(logger, "toCarBizAdditionalInfoPage", "===查询征信发送结果Start===prjId:"+projectId+",itlQC:"+JSON.toJSONString(itlQC), CurrentThreadContext.getCurrentUserName());
				List<InfTransLogDTO> findTransLogs = this.transLogApi.findTransLogs(itlQC);
				BaseLogUtils.info(logger, "toCarBizAdditionalInfoPage", "===查询征信发送结果End===prjId:"+projectId, CurrentThreadContext.getCurrentUserName());
				if(CollectionUtils.isNotEmpty(findTransLogs)){
					InfTransLogDTO infTransLogDTO = findTransLogs.get(0);
					if(null!=infTransLogDTO){
						sendStatus = infTransLogDTO.getStatus();
					}
				}
				view.addObject("sendStatus", sendStatus);//同步状态 unsent-未发送  success-发送成功  failure-发送失败
				view.addObject("sendStatusNm", this.getStatusNm(sendStatus));
				
//				String aStatus = "";
//				String mStatus = "";
//				String rStatus = "";
//				String sStatus = "";
//				PrjPrdPaySchMQueryCondition pppsmQC = new PrjPrdPaySchMQueryCondition();
//				pppsmQC.setPrjId(Long.valueOf(projectId));
//				List<PrjPrdPaySchMVO> prjPrdPaySchMVOList = this.prjPrdPaySchMService.searchList(pppsmQC);
//				if(CollectionUtils.isNotEmpty(prjPrdPaySchMVOList)){
//					PrjPrdPaySchMVO prjPrdPaySchMVO = prjPrdPaySchMVOList.get(0);
					if("success".equals(sendStatus)){
						PrjPrdPaySchMQueryCondition pppsmQC = new PrjPrdPaySchMQueryCondition();
						pppsmQC.setPrjId(Long.valueOf(projectId));
                        pppsmQC.setPaySchTypCd(PrjPrdPaySchMConstant.PAY_SCH_TYP_CD_WS);
                        BaseLogUtils.info(logger, "toCarBizAdditionalInfoPage", "===查询支付表信息Start===prjId:"+projectId, CurrentThreadContext.getCurrentUserName());
						List<PrjPrdPaySchMVO> prjPrdPaySchMVOList = this.prjPrdPaySchMService.searchList(pppsmQC);
						BaseLogUtils.info(logger, "toCarBizAdditionalInfoPage", "===查询支付表信息End===prjId:"+projectId+",prjPrdPaySchMVOList:"+JSON.toJSONString(prjPrdPaySchMVOList), CurrentThreadContext.getCurrentUserName());
						if(CollectionUtils.isNotEmpty(prjPrdPaySchMVOList)){
							List<Long> paySchIds = new ArrayList<Long>();
							for (PrjPrdPaySchMVO prjPrdPaySchMVO : prjPrdPaySchMVOList) {
								paySchIds.add(prjPrdPaySchMVO.getId());
							}
							BaseLogUtils.info(logger, "toCarBizAdditionalInfoPage", "===查询征信请求结果Start===prjId:"+projectId+",insId:"+prjBscInfoVO.getFundRasInsId()+",insCd:"+prjBscInfoVO.getInsCode()+",paySchIds:"+JSON.toJSONString(paySchIds), CurrentThreadContext.getCurrentUserName());
							cmm.mid.core.framework.dto.MessageDTO<CreditDTO> queryCredit = this.tripartiteApi.queryCredit(prjBscInfoVO.getFundRasInsId(), prjBscInfoVO.getInsCode(), prjBscInfoVO.getId(), paySchIds);
							BaseLogUtils.info(logger, "toCarBizAdditionalInfoPage", "===查询征信请求结果End===prjId:"+projectId, CurrentThreadContext.getCurrentUserName());
							if(null!=queryCredit && queryCredit.isSuccess()){
								CreditDTO creditDTO = queryCredit.getData();
								if(null!=creditDTO){
									String auditResult = creditDTO.getAuditResult();
									String auditDesc = creditDTO.getAuditDesc();
									view.addObject("auditResult", auditResult);//审核结果
									view.addObject("auditDesc", auditDesc);//审核描述
								}
							}
						}
						/*BaseLogUtils.info(logger, "toCarBizAdditionalInfoPage", "===查询征信请求结果Start===prjId:"+projectId+",paySchId:"+prjPrdPaySchMVO.getId(), CurrentThreadContext.getCurrentUserName());
						MessageDTO<QueryCreditDTO> queryCredit = this.icbcApi.queryCredit(171225242000321L, "icbc", Long.valueOf(projectId), prjPrdPaySchMVO.getId());
						BaseLogUtils.info(logger, "toCarBizAdditionalInfoPage", "===查询征信请求结果End===prjId:"+projectId+",paySchId:"+prjPrdPaySchMVO.getId()+",queryCredit:"+JSON.toJSONString(queryCredit), CurrentThreadContext.getCurrentUserName());
						if(null!=queryCredit && null!=queryCredit.getData()){
							QueryCreditDTO queryCreditDTO = queryCredit.getData();
							aStatus = queryCreditDTO.getaStatus();
							mStatus = queryCreditDTO.getmStatus();
							rStatus = queryCreditDTO.getrStatus();
							sStatus = queryCreditDTO.getsStatus();
						}*/
					}
				}
				
//				view.addObject("aStatus", aStatus);//申请人
//				view.addObject("aStatusNm", this.getStatusNm(aStatus));
//				view.addObject("mStatus", mStatus);//配偶
//				view.addObject("mStatusNm", this.getStatusNm(mStatus));
//				view.addObject("rStatus", rStatus);//担保人1
//				view.addObject("rStatusNm", this.getStatusNm(rStatus));
//				view.addObject("sStatus", sStatus);//担保人2
//				view.addObject("sStatusNm", this.getStatusNm(sStatus));
//			}
		}catch (Exception e) {
			BaseLogUtils.info(logger, "toCarBizAdditionalInfoPage", "===查询征信异常===prjId:"+projectId, CurrentThreadContext.getCurrentUserName());
			e.printStackTrace();
		}
        
		return view;
	}
	
	/**
	 * 状态
	 * 0：等待处理
	 * 1：查询通过
	 * 2：查询通过
	 * 3：放弃查询
	 * 9：未知错误，请联系系统管理员确认
	 */
    private String getStatusNm(String status){
    	if(StringUtils.isNotEmpty(status)){
    		if(InterfaceConstants.TransStatus.unsent.key().equals(status)){
        		return InterfaceConstants.TransStatus.unsent.desc();
        	}else if(InterfaceConstants.TransStatus.failure.key().equals(status)){
        		return InterfaceConstants.TransStatus.failure.desc();
        	}else if(InterfaceConstants.TransStatus.success.key().equals(status)){
        		return InterfaceConstants.TransStatus.success.desc();
        	}else if("0".equals(status)){
        		return "等待处理";
        	}else if("1".equals(status)){
        		return "查询通过";
        	}else if("2".equals(status)){
        		return "查询不通过";
        	}else if("3".equals(status)){
        		return "放弃查询";
        	}else if("9".equals(status)){
        		return "未知错误，请联系系统管理员确认";
        	}else{
        		return "无";
        	}
    	}else{
    		return "无";
    	}
    }
	
	/**
	 * 到流程附加信息页面 - 专车
	 * @param request
	 * @param response
	 * @return
	 */
	@RequestMapping(value = "/toBusAdditionalInfoPage.do", method = { RequestMethod.GET, RequestMethod.POST })
	public ModelAndView toBusAdditionalInfoPage(HttpServletRequest request, HttpServletResponse response) {
		String projectId = request.getParameter("projectId");//项目ID
		String proIntId = request.getParameter("processInstanceId");//流程实例ID
		String taskId = request.getParameter("taskId");//任务ID
		String taskDefKey = request.getParameter("taskDefKey");//任务KEY
		String isDetail = request.getParameter("isDetail");//1:其他节点 0:信审节点
		String taskNm = request.getParameter("taskNm");//任务名称
		String ctrlKey = request.getParameter("ctrlKey");//资料标识//控制键 1.可上传、下载、删除 2.可验证 3.不可操作
        String exposureSource = request.getParameter("exposureSource");//是否展示敞口
        String fromCAFlag = request.getParameter("fromCAFlag");//信审初审节点 信息采集页面修改标识 1：可修改
//		if(StringUtils.isNotEmpty(proIntId)) proIntId = proIntId.replace("\'", "");
//		if(StringUtils.isNotEmpty(taskId)) taskId = taskId.replace("\'", "");
//		if(StringUtils.isNotEmpty(taskDefKey)) taskDefKey = taskDefKey.replace("\'", "");
//		if(StringUtils.isNotEmpty(taskNm)) taskNm = taskNm.replace("\'", "");
		
		ModelAndView view = new ModelAndView("project/additionalInfo/busAudNodeAdditionalInfo");
		String isBusKC = request.getParameter("isBusKC");//专车客车评审标识
		if(StringUtils.isNotEmpty(isBusKC) && isBusKC.equals("1")){
			view = new ModelAndView("project/additionalInfo/audNodeAdditionalInfo");
		}
		view.addObject("isBusKC", isBusKC);
		
		view.addObject("projectId", projectId);
		view.addObject("proIntId", proIntId);
		view.addObject("taskId", taskId);
		view.addObject("taskDefKey", taskDefKey);
		view.addObject("taskNm", taskNm);
		view.addObject("isDetail", isDetail);
		view.addObject("ctrlKey", ctrlKey);
        view.addObject("exposureSource", exposureSource);
        view.addObject("currentUsrId", CurrentThreadContext.getCurrentUserId());

        //客车租赁评审流程 信审员审核 流程中传递fromCAFlag参数标识 如果标识存在则可以修改
        if((StringUtils.isNotEmpty(fromCAFlag) && BaseConstant.IS_YESNO_YES_STR.equals(fromCAFlag))) {
			view.addObject("fromCAFlag", true);
		}

		// 信审员初审，新能源汽车快捷报单流程 三方资管城配业务工行评审流程 重卡城配项目评审流程 信审员审核
		if((StringUtils.isNotEmpty(taskNm) && (taskNm.indexOf("信审") != -1 && taskNm.indexOf("初审") != -1))
				|| "FLOW_00000001_001_001_001".equals(taskDefKey) || "FLOW_00000013_001_002_001".equals(taskDefKey) || "FLOW_00000001_001_004_001".equals(taskDefKey)) {
			view.addObject("fromCAFlag", true);
		}
		int guaraStatus = 1;//担保人操作按钮展示状态
		if (StringUtils.isNotBlank(taskDefKey)) {
			if (PrjBscInfoConstant.VERIFY_DBR_CAN_PUSH_FLOW_NO.contains(taskDefKey)){
				guaraStatus = 2;
			}
		}
		view.addObject("guaraStatus", guaraStatus);

        //核价员核价标识
		String isNeedPrice = request.getParameter("isNeedPrice");
		view.addObject("isNeedPrice", isNeedPrice);
		
		try {
			//查询项目信息
			PrjBscInfoVO prjBscInfoVO = null;
			String mp = "";//客户经理手机号
			if(StringUtils.isNotEmpty(projectId)){
				prjBscInfoVO = this.prjBscInfoService.selectById(Long.valueOf(projectId));
				if(null!=prjBscInfoVO && StringUtils.isNotEmpty(prjBscInfoVO.getCstMgrId())){
					SysUsrVO sysUsrVO = this.sysUsrService.selectById(prjBscInfoVO.getCstMgrId(), CurrentThreadContext.getCurrentSysCd());
					if(null!=sysUsrVO && StringUtils.isNotBlank(sysUsrVO.getMp())){
						mp = sysUsrVO.getMp();
					}
				}
                view.addObject("isInsBiz", prjBscInfoVO.getIsInsBiz());
            }
			view.addObject("prjTypCd", prjBscInfoVO.getPrjTypCd() == null ? "" : prjBscInfoVO.getPrjTypCd());
			view.addObject("mp", mp);
			view.addObject("buOrgCd", prjBscInfoVO.getBuOrgCd());
			view.addObject("isSplMfr", prjBscInfoVO.getIsSplMfr());
			view.addObject("pledgeNm", prjBscInfoVO.getPledgeNm());//（tsn）
			if(prjBscInfoVO != null && StringUtils.isNotBlank(prjBscInfoVO.getOpen())){//（tsn）
				view.addObject("opens", prjBscInfoVO.getOpen());
			}/*else{
				 Long open = this.projectApiService.selectOpen(prjBscInfoVO.getCstId(),prjBscInfoVO.getId());
			       Double fenToYuan = DecimalUtils.convertFenToYuan(open);
			       DecimalFormat d =   new DecimalFormat("0.00");
			       String open2 = d.format(fenToYuan);
			     
			       PrjBscInfoVO entity = new PrjBscInfoVO() ;
			       entity.setOpen(open2);
			       entity.setId(Long.valueOf(projectId));
			       boolean modify = this.prjBscInfoService.modify(entity);
			       prjBscInfoVO = this.prjBscInfoService.selectById(Long.valueOf(projectId));
			       view.addObject("opens", prjBscInfoVO.getOpen()); 
			}*/
		       
			if(StringUtils.isNotEmpty(isBusKC) && isBusKC.equals("1")){
				view.addObject("busFlowInfoPage", "1");//通过意见链接
				view.addObject("showLinkPerson", "1");//专车流程页面跳转  与重卡共用一个页面   展示联系人列表
				view.addObject("showIsMeetPolicyCd", "1");//专车流程页面跳转  与重卡共用一个页面   显示 是否符合政策 字段
				view.addObject("showCstLvl", "1");//专车流程页面跳转  与重卡共用一个页面   默认设置展示客户等级
			}
			//系统判断方案审核结果
			if (prjBscInfoVO != null && prjBscInfoVO.getAuditInfo() != null){
				String auditInfo = prjBscInfoVO.getAuditInfo();
				if(StringUtils.isNotEmpty(auditInfo)){
					String replaceAll = auditInfo.replaceAll(">>", "</br>");
					view.addObject("auditInfo", replaceAll);
				}
			}
			//风险标记开始
			List<Long> prjPrdDtlIdList = new ArrayList<Long>();
			PrjPrdDtlQueryCondition dtlQC = new PrjPrdDtlQueryCondition();
			dtlQC.setPrjId(Long.valueOf(projectId));
			List<PrjPrdDtlVO> dtlList = this.prjPrdDtlService.selectList(dtlQC);
			if(CollectionUtils.isNotEmpty(dtlList)){
				for (PrjPrdDtlVO dtl : dtlList) {
					if(!prjPrdDtlIdList.contains(dtl.getId())){
						prjPrdDtlIdList.add(dtl.getId());
					}
				}
			}
			Map<String,String> result = this.rskCstSignLogService.searchRskResInfo(prjBscInfoVO.getCstId(),Long.valueOf(projectId),prjPrdDtlIdList);
			if(MapUtils.isNotEmpty(result)){
				//客户风险标记
				view.addObject("rskCstSignDesc",result.get("rskCstSignDesc"));
				//设备风险标记
				view.addObject("rskProdSignDesc", result.get("rskProdSignDesc"));
				//担保人风险标记
				view.addObject("rskGuarSignDesc", result.get("rskGuarSignDesc"));
				//vin风险标记
				view.addObject("rskVinSignDesc",result.get("rskVinSignDesc"));
				//承租人手机号风险标记
				view.addObject("rskCstMpSignDesc", result.get("rskCstMpSignDesc"));
				//挂靠公司风险标记
				view.addObject("rskLnkSignDesc", result.get("rskLnkSignDesc"));
				//供应商风险标记
				view.addObject("rskSplSignDesc", result.get("rskSplSignDesc"));
				/*view.addObject("rskSts", result.get("rskSts"));//审批控制状态*/
			}else{
				//客户风险标记
				view.addObject("rskCstSignDesc","");
				//设备风险标记
				view.addObject("rskProdSignDesc", "");
				//担保人风险标记
				view.addObject("rskGuarSignDesc", "");
				//vin风险标记
				view.addObject("rskVinSignDesc","");
				//承租人手机号风险标记
				view.addObject("rskCstMpSignDesc", "");
				//挂靠公司风险标记
				view.addObject("rskLnkSignDesc", "");
				//供应商风险标记
				view.addObject("rskSplSignDesc", "");
				/*view.addObject("rskSts", BaseConstant.IS_YESNO_NO_STR);//审批控制状态(默认不控制)*/
			}

			//是否显示维护客户等级
			String saveCstLvl = request.getParameter("saveCstLvl");
			view.addObject("saveCstLvl", saveCstLvl);
			List<KeyValueVO> cstLvlCdList = new ArrayList<KeyValueVO>();
			if(null!=prjBscInfoVO && StringUtils.isNotEmpty(prjBscInfoVO.getCstMgrOrgCd())){
				//查询客户等级数据字典 - 根据客户经理组织架构
				cstLvlCdList = this.sysDictionaryApiService.getKvList(DictionaryConstant.CODE_GRP_CST_LVL_CD, CurrentThreadContext.getCurrentSysCd(), 
						prjBscInfoVO.getCstMgrOrgCd());
			}
			view.addObject("cstLvlCdList", cstLvlCdList);
			//查询客户客户等级 设置默认值
			String cstLvlCd = "";
			if(null!=prjBscInfoVO && StringUtils.isNotEmpty(prjBscInfoVO.getCstId())){
				/*CstBscInfoVO cstBscInfoVO = this.cstBscInfoService.selectById(prjBscInfoVO.getCstId());
				if(null!=cstBscInfoVO){
					cstLvlCd = cstBscInfoVO.getCstLvlCd();
				}*/
				String orgCd = prjBscInfoVO.getCstMgrOrgCd();
				String buOrgCd = "";
				if(orgCd!=null&&orgCd.length()>8){
					buOrgCd = orgCd.substring(0,8);
				}
				CstBscInfoVO cstBscInfoVO = this.cstBscInfoService.selectDetailBy(prjBscInfoVO.getCstId(),orgCd,buOrgCd);
				if(null!=cstBscInfoVO){
					cstLvlCd = cstBscInfoVO.getCstLvlCd();
				}
				
			}
			view.addObject("cstLvlCd", cstLvlCd);
			view.addObject("cstId", prjBscInfoVO.getCstId());
			//系统判断方案审核结果
			String auditInfo = prjBscInfoVO.getAuditInfo();
			if(StringUtils.isNotEmpty(auditInfo)){
				String replaceAll = auditInfo.replaceAll(">>", "</br>");
				view.addObject("auditInfo", replaceAll);
			}
			//查询项目产品信息 取产品类型传到页面 刷新车辆运营动态字段
			String prdTypCd = "";
			PrjPrdBscInfoQueryCondition prjPrdQc = new PrjPrdBscInfoQueryCondition();
			if(StringUtils.isNotEmpty(projectId)){
				prjPrdQc.setPrjId(Long.valueOf(projectId));
			}
			List<PrjPrdBscInfoVO> prjPrdBscInfoVOList = this.prjPrdBscInfoService.searchList(prjPrdQc);
			if(CollectionUtils.isNotEmpty(prjPrdBscInfoVOList)){
				prdTypCd = prjPrdBscInfoVOList.get(0).getPrdTypCd();
			}
			view.addObject("prdTypCd", prdTypCd);
			//根据所查到的产品类型 查询映射表配置 获得哪些产品类型有数据需要实例化
			List<String> tCodeList = new ArrayList<String>();
			if(CollectionUtils.isNotEmpty(prjPrdBscInfoVOList)){
				List<String> sCodeList = new ArrayList<String>();
				for (PrjPrdBscInfoVO prjPrdBscInfoVO : prjPrdBscInfoVOList) {
					if(!sCodeList.contains(prjPrdBscInfoVO.getPrdTypCd())){
						sCodeList.add(prjPrdBscInfoVO.getPrdTypCd());
					}
				}
				if(CollectionUtils.isNotEmpty(sCodeList)){
					SysCdMapDQueryCondition cdMapDQC = new SysCdMapDQueryCondition();
					cdMapDQC.setSysCd(CurrentThreadContext.getCurrentSysCd());
					cdMapDQC.setOrgCd(CurrentThreadContext.getCurrentOrgCd());
					cdMapDQC.setmTypCd("M2006");
					cdMapDQC.setsCodeList(sCodeList);
					List<SysCdMapDDTO> sysCdMapDList = this.sysCdMapApiService.searchSysCdMapDWithTargetList(cdMapDQC);
					if(CollectionUtils.isNotEmpty(sysCdMapDList)){
						for (SysCdMapDDTO sysCdMapDDTO : sysCdMapDList) {
							if(!tCodeList.contains(sysCdMapDDTO.getTCode())){
								tCodeList.add(sysCdMapDDTO.getTCode());
							}
						}
					}
				}
			}
			StringBuffer tCodeString = new StringBuffer();
			if(CollectionUtils.isNotEmpty(tCodeList)){
				for (String string : tCodeList) {
					tCodeString.append(string+";");
				}
				view.addObject("tCodeString", tCodeString.substring(0, tCodeString.length()-1).toString());
			}
			
			//设备大类
			List<KeyValueVO> equCategoryCdList = this.prjBscInfoService.searchEquCategoryCdList(CurrentThreadContext.getCurrentSysCd(),prjBscInfoVO.getBuOrgCd());
			view.addObject("equCategoryCdListJSON", JSON.toJSONString(equCategoryCdList));
			//车辆级别
			List<KeyValueVO> carLevelCdList = this.prjBscInfoService.searchCarLevelCdList();
			view.addObject("carLevelCdListJSON", JSON.toJSON(carLevelCdList));
			//农机设备大类
			List<KeyValueVO> farmEquCategoryCdList = this.prjBscInfoService.searchFarmEquCategoryCdList();
			view.addObject("farmEquCategoryCdListJSON", JSON.toJSON(farmEquCategoryCdList));
	
			if(StringUtils.isNotEmpty(isBusKC) && isBusKC.equals("1")){
				//收入方式
				List<KeyValueVO> profitCdList = this.audReturnVisitService.searchProfitCdList(CurrentThreadContext.getCurrentSysCd(),prjBscInfoVO.getBuOrgCd());
				view.addObject("profitCdList", profitCdList);
				//运营年限/本地生活年限
				List<KeyValueVO> bizExpList = this.audReturnVisitService.searchBizExpList();
				view.addObject("bizExpList", bizExpList);
				//主货物大类
				List<KeyValueVO> mainGdsTypCdList = this.audCreditInfoService.searchGoodsTypListByLvl("1");
				view.addObject("mainGdsTypCdList", mainGdsTypCdList);
				//货物来源
				List<KeyValueVO> goodsResList = this.audReturnVisitService.searchGoodsResList();
				view.addObject("goodsResList", goodsResList);
				//主货物结算方式
				List<KeyValueVO> gdsStlWayCdList = this.audReturnVisitService.searchGdsStlWayCdList();
				view.addObject("gdsStlWayCdList", gdsStlWayCdList);
				//司机情况
				List<KeyValueVO> driverList = this.audReturnVisitService.searchDriverList();
				view.addObject("driverList", driverList);
				//第二还款来源
				List<KeyValueVO> secondPayResCdList = this.audReturnVisitService.searchSecondPayResCdList();
				view.addObject("secondPayResCdList", secondPayResCdList);
				//是否团单
				List<KeyValueVO> isGrpList = this.capPayInfoService.searchIsGrpList();
				view.addObject("isGrpList", isGrpList);
			}
			
			//是否
			List<KeyValueVO> yesOrNoCdList = this.audStandingBookService.searchYesOrNoCdList();
			view.addObject("yesOrNoCdList", yesOrNoCdList);
			//流程审核意见
			List<KeyValueVO> processOpinionCdList = this.audStandingBookService.searchProcessOpinionCdList();
			view.addObject("processOpinionCdList", processOpinionCdList);
			
			if(StringUtils.isNotEmpty(isBusKC) && isBusKC.equals("1")){
				//客户经理评级
				List<KeyValueVO> cstMgrLvlCdList = this.audInterviewInfoService.searchCstMgrLvlCdList();
				view.addObject("cstMgrLvlCdList", cstMgrLvlCdList);
				//首付款来源
				List<KeyValueVO> firstPayResCdList = this.audInterviewInfoService.searchFirstPayResCdList();
				view.addObject("firstPayResCdList", firstPayResCdList);
				//风控评级
				List<KeyValueVO> riskCtrlLvlCdList = this.audInterviewInfoService.searchRiskCtrlLvlCdList();
				view.addObject("riskCtrlLvlCdList", riskCtrlLvlCdList);
				
				List<KeyValueVO> isMeetPolicyCdList = this.audCreditInfoService.searchIsMeetPolicyCdList();
				view.addObject("isMeetPolicyCdList", isMeetPolicyCdList);
			}
			
			//本外地
			List<KeyValueVO> localOrNoList = this.audStandingBookService.searchLocalOrNoList();
			view.addObject("localOrNoList", localOrNoList);
			
			List<KeyValueVO> returnVisitConfirmCdList = this.audReturnVisitService.searchReturnVisitConfirmCdList();
			view.addObject("returnVisitConfirmCdList", returnVisitConfirmCdList);
			
			List<KeyValueVO> repayTypCdList = this.audStandingBookService.searchRepayTypCdList();
			view.addObject("repayTypCdList", repayTypCdList);

            //风险提示
            List<KeyValueVO> riskTipsList = sysDictionaryApiService.getKvList(PrjMapRiskConstant.MAP_RISK_TIPS_CD, CurrentThreadContext.getCurrentSysCd(), CurrentThreadContext.getCurrentOrgCd());
            view.addObject("riskTipsList", JSONArray.fromObject(riskTipsList));
            //贷前风险标记
			List<KeyValueVO> preLoanRiskFlagCdList = sysDictionaryApiService.getKvList(DictionaryConstant.PRE_LOAN_RISK_FLAG_CD, CurrentThreadContext.getCurrentSysCd(), CurrentThreadContext.getCurrentOrgCd());
			view.addObject("preLoanRiskFlagCdList", preLoanRiskFlagCdList);
			//问题记录
			List<KeyValueVO> problemRecordCdList = this.sysDictionaryApiService.getKvList(AudStandingBookConstant.PROBLEM_RECORD_CD, CurrentThreadContext.getCurrentSysCd(), CurrentThreadContext.getCurrentOrgCd());
			view.addObject("problemRecordCdList", problemRecordCdList);
			//是否呈报
			List<KeyValueVO> submitCdList = this.sysDictionaryApiService.getKvList(AudStandingBookConstant.SUBMIT_CD, CurrentThreadContext.getCurrentSysCd(), CurrentThreadContext.getCurrentOrgCd());
			view.addObject("submitCdList", submitCdList);
			//业务实质
			List<KeyValueVO> bussEssenceCdList = this.sysDictionaryApiService.getKvList(AudStandingBookConstant.BUSS_ESSENCE_CD, CurrentThreadContext.getCurrentSysCd(), CurrentThreadContext.getCurrentOrgCd());
			view.addObject("bussEssenceCdList", bussEssenceCdList);
			//客户评级-经验
			List<KeyValueVO> experienceCdList = this.sysDictionaryApiService.getKvList(AudStandingBookConstant.EXPERIENCE_CD, CurrentThreadContext.getCurrentSysCd(), CurrentThreadContext.getCurrentOrgCd());
			view.addObject("experienceCdList", experienceCdList);
			//客户评级-货源
			List<KeyValueVO> goodsSourceCdList = this.sysDictionaryApiService.getKvList(AudStandingBookConstant.GOODS_SOURCE_CD, CurrentThreadContext.getCurrentSysCd(), CurrentThreadContext.getCurrentOrgCd());
			view.addObject("goodsSourceCdList", goodsSourceCdList);
			//拆单/顶名嫌疑
			List<KeyValueVO> suspicionCdList = this.sysDictionaryApiService.getKvList(AudStandingBookConstant.SUSPICION_CD, CurrentThreadContext.getCurrentSysCd(), CurrentThreadContext.getCurrentOrgCd());
			view.addObject("suspicionCdList", suspicionCdList);
			//还款能力
			List<KeyValueVO> repaymentCapacityCdList = this.sysDictionaryApiService.getKvList(AudStandingBookConstant.REPAYMENT_CAPACITY_CD, CurrentThreadContext.getCurrentSysCd(), CurrentThreadContext.getCurrentOrgCd());
			view.addObject("repaymentCapacityCdList", repaymentCapacityCdList);
			//配合度
			List<KeyValueVO> complianceCdList = this.sysDictionaryApiService.getKvList(AudStandingBookConstant.COMPLIANCE_CD, CurrentThreadContext.getCurrentSysCd(), CurrentThreadContext.getCurrentOrgCd());
			view.addObject("complianceCdList", complianceCdList);

            /**
             * 判断是否信审节点
             * 判断签收标识
             * 查询是否已经发送过短信给承租人(根据流程实例ID和模板Code查询)
             */
			if(StringUtils.isNotEmpty(isDetail) && String.valueOf(BaseConstant.IS_YESNO_NO).equals(isDetail)){
				String isSign = request.getParameter("isSign");
				if(StringUtils.isNotEmpty(isSign) && String.valueOf(BaseConstant.IS_YESNO_YES).equals(isSign)){
					SysSmsLogQueryCondition qc = new SysSmsLogQueryCondition();
					qc.setTemplatesCode(SysConTemplatesConstant.SMS_CREDIT_AUDIT_SIGN);
					qc.setCustomField(proIntId);
					BaseLogUtils.info(logger, "toAdditionalInfoPage", "===查询发送短信日志Start===qc:"+JSON.toJSONString(qc));
					List<SysSmsLogDTO> sysSmsLogList = this.sysSmsApiService.searchSysSmsLogList(qc);
					BaseLogUtils.info(logger, "toAdditionalInfoPage", "===查询发送短信日志End===sysSmsLogList:"+JSON.toJSONString(sysSmsLogList));
					if(CollectionUtils.isEmpty(sysSmsLogList)){
						if(null!=prjBscInfoVO){
							String cstNm = prjBscInfoVO.getCstNm();//客户名称
							Long cstId = prjBscInfoVO.getCstId();
							String cstMp = "";//客户手机号
							if(StringUtils.isNotEmpty(cstId)){
								CstNpBscInfoQueryCondition npQC = new CstNpBscInfoQueryCondition();
								List<Long> cstIdList = new ArrayList<Long>();
								cstIdList.add(cstId);
								npQC.setIdList(cstIdList);
								BaseLogUtils.info(logger, "toAdditionalInfoPage", "===查询自然人客户信息Start===npQC:"+JSON.toJSONString(npQC));
								List<CstNpBscInfoDTO> cstNpBscInfoList = this.customerQueryApiService.searchCstNpBscInfoList(npQC);
								BaseLogUtils.info(logger, "toAdditionalInfoPage", "===查询自然人客户信息End===cstNpBscInfoList:"+JSON.toJSONString(cstNpBscInfoList));
								if(CollectionUtils.isNotEmpty(cstNpBscInfoList)){
									CstNpBscInfoDTO cstNpBscInfoDTO = cstNpBscInfoList.get(0);
									if(null!=cstNpBscInfoDTO){
										String mp1 = cstNpBscInfoDTO.getMp1();
										String mp2 = cstNpBscInfoDTO.getMp2();
										if(StringUtils.isNotEmpty(mp1)){
											cstMp = mp1;
										}else if(StringUtils.isNotEmpty(mp2)){
											cstMp = mp2;
										}
									}
								}
							}
							//发送短信
							if(StringUtils.isNotEmpty(cstMp) && StringUtils.isNotEmpty(cstNm)){
								Map<String, String> contextParams = new HashMap<String, String>();//短信内容参数
								contextParams.put("客户姓名", cstNm);
								//发送短信对象
								SendContextDTO sendContextDTO = new SendContextDTO();
								sendContextDTO.setPhone(cstMp);
								sendContextDTO.setTemplatesCode(SysConTemplatesConstant.SMS_CREDIT_AUDIT_SIGN);
								sendContextDTO.setContextParams(contextParams);
								sendContextDTO.setCreateId(CurrentThreadContext.getCurrentUserId());
								sendContextDTO.setCreateName(CurrentThreadContext.getCurrentUserName());
								sendContextDTO.setCreateDate(new Date());
								sendContextDTO.setCustomField(proIntId);
								BaseLogUtils.info(logger, "toAdditionalInfoPage", "===发送短信Start===sendContextDTO:"+JSON.toJSONString(sendContextDTO));
								DataResultDTO sendSmsResultDTO = this.sysSmsApiService.sendSms(sendContextDTO);
								BaseLogUtils.info(logger, "toAdditionalInfoPage", "===发送短信End===sendSmsResultDTO:"+JSON.toJSONString(sendSmsResultDTO));
							}
						}
					}
				}
				//发短信给客户经理
				if(StringUtils.isNotEmpty(isSign) && String.valueOf(BaseConstant.IS_YESNO_YES).equals(isSign)){
					SysSmsLogQueryCondition qc = new SysSmsLogQueryCondition();
					qc.setTemplatesCode(SysConTemplatesConstant.SMS_CREDIT_AUDIT_SIGN_MGR);
					qc.setCustomField(proIntId);
					BaseLogUtils.info(logger, "toAdditionalInfoPage", "===查询发送短信日志Start===qc:"+JSON.toJSONString(qc));
					List<SysSmsLogDTO> sysSmsLogList = this.sysSmsApiService.searchSysSmsLogList(qc);
					BaseLogUtils.info(logger, "toAdditionalInfoPage", "===查询发送短信日志End===sysSmsLogList:"+JSON.toJSONString(sysSmsLogList));
					if(CollectionUtils.isEmpty(sysSmsLogList)){
						if(null!=prjBscInfoVO){
							String cstNm = prjBscInfoVO.getCstNm();//客户名称
							String cstMgrNm = prjBscInfoVO.getCstMgrNm();//客户经理名称
							//发送短信
							if(StringUtils.isNotEmpty(mp) && StringUtils.isNotEmpty(cstMgrNm) && StringUtils.isNotEmpty(cstNm) && StringUtils.isNotEmpty(taskNm)){
								Map<String, String> contextParams = new HashMap<String, String>();//短信内容参数
								contextParams.put("客户经理名称", cstMgrNm);
								contextParams.put("客户名称", cstNm);
								contextParams.put("节点名称", taskNm);
								//发送短信对象
								SendContextDTO sendContextDTO = new SendContextDTO();
								sendContextDTO.setPhone(mp);
								sendContextDTO.setTemplatesCode(SysConTemplatesConstant.SMS_CREDIT_AUDIT_SIGN_MGR);
								sendContextDTO.setContextParams(contextParams);
								sendContextDTO.setCreateId(CurrentThreadContext.getCurrentUserId());
								sendContextDTO.setCreateName(CurrentThreadContext.getCurrentUserName());
								sendContextDTO.setCreateDate(new Date());
								sendContextDTO.setCustomField(proIntId);
								BaseLogUtils.info(logger, "toAdditionalInfoPage", "===发送短信Start===sendContextDTO:"+JSON.toJSONString(sendContextDTO));
								DataResultDTO sendSmsResultDTO = this.sysSmsApiService.sendSms(sendContextDTO);
								BaseLogUtils.info(logger, "toAdditionalInfoPage", "===发送短信End===sendSmsResultDTO:"+JSON.toJSONString(sendSmsResultDTO));
							}
						}
					}
				}
			}
		} catch (Exception e) {
			BaseLogUtils.info(logger, "sendMsgForCreditAuditPass", "===跳转流程附加信息页面异常===projectId:"+projectId+e.getMessage());
			BaseLogUtils.error(logger, "-", "异常", e);
		}
		
		return view;
	}
	
	/**
	 * 门店店长修改客户等级
	 */
	@RequestMapping(value = "/modifyCstLvlCd.do", method = { RequestMethod.POST })
	@ResponseBody
	public Object modifyCstLvlCd(HttpServletRequest request, HttpServletResponse response) throws BaseException {
		DataResultVO result = new DataResultVO(BaseConstant.IS_YESNO_YES,SysLogConstant.LOG_CMM_OPERATE_SUCC);
		String cstLvlCd = request.getParameter("cstLvlCd");
		String cstId = request.getParameter("cstId");
		String cstMgrOrgCd = request.getParameter("cstMgrOrgCd");
		String buOrgCd = request.getParameter("buOrgCd");
		if(StringUtils.isEmpty(cstLvlCd)){
			throw new BaseException(BaseExceptionConstant.BASE_EXCEPTION_CODE_600, "客户等级不能为空.");
		}
		if(StringUtils.isEmpty(cstId)){
			throw new BaseException(BaseExceptionConstant.BASE_EXCEPTION_CODE_600, "客户ID不能为空.");
		}
		if(StringUtils.isEmpty(cstMgrOrgCd)){
			throw new BaseException(BaseExceptionConstant.BASE_EXCEPTION_CODE_600, "客户经理组织架构不能为空.");
		}
		if(StringUtils.isEmpty(buOrgCd)){
			throw new BaseException(BaseExceptionConstant.BASE_EXCEPTION_CODE_600, "客户经理所属事业部不能为空.");
		}
		try {
			boolean success = true;
			CstRlAttrQueryCondition condition = new CstRlAttrQueryCondition();
			condition.setBuOrgCd(buOrgCd);
			condition.setRlTypCd("3");
			condition.setCstId(Long.valueOf(cstId));
			List<CstRlAttrVO>  voList= this.cstRlAttrService.searchList(condition);
			if(CollectionUtils.isNotEmpty(voList)){
				for(CstRlAttrVO vo:voList){
					vo.setRlVal(cstLvlCd);
					success = this.cstRlAttrService.modify(vo);
				}
			}else{
				CstRlAttrVO vo =new CstRlAttrVO();
				vo.setBuOrgCd(buOrgCd);
				vo.setOrgCd(cstMgrOrgCd);
				vo.setRlTypCd("3");
				vo.setRlVal(cstLvlCd);
				vo.setCstId(Long.valueOf(cstId));
				this.cstRlAttrService.add(vo);
			}
			if(!success){
				result.setSuccess(BaseConstant.IS_YESNO_NO);
				result.setInfo(SysLogConstant.LOG_CMM_OPERATE_FAIL);
				BaseLogUtils.info(logger, "modifyCstLvlCd", "修改客户等级失败.cstLvlCd:"+cstLvlCd+",cstId:"+cstId, CurrentThreadContext.getCurrentUserName());
				return result;
			}
			BaseLogUtils.info(logger, "modifyCstLvlCd", "修改客户等级成功.cstLvlCd:"+cstLvlCd+",cstId:"+cstId, CurrentThreadContext.getCurrentUserName());
		}catch (BaseException ex) {
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo(SysLogConstant.LOG_CMM_SYS_ERROR+ex.getMessage());
			BaseLogUtils.info(logger, "modifyCstLvlCd", "修改客户等级失败.cstLvlCd:"+cstLvlCd+",cstId:"+cstId+".ERROR:"+ex.getMessage(), CurrentThreadContext.getCurrentUserName());
		}catch (Exception ex) {
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo(SysLogConstant.LOG_CMM_SYS_ERROR+ex.getMessage());
			BaseLogUtils.error(logger, "modifyCstLvlCd", "修改客户等级失败,系统错误.cstLvlCd:"+cstLvlCd+",cstId:"+cstId+".ERROR:"+ex.getMessage(), CurrentThreadContext.getCurrentUserName());
		}
		return result;
	}
	
	/**
     * 提交征信
     * @param request
     * @param response
     * @return
     */
    @RequestMapping(value = "/submitCredit.do", method = { RequestMethod.POST})
	@ResponseBody
	public Object submitCredit(HttpServletRequest request, HttpServletResponse response) {
		DataResultVO result = new DataResultVO(BaseConstant.IS_YESNO_YES, SysLogConstant.LOG_CMM_OPERATE_SUCC);
		String prjId = request.getParameter("prjId");//项目ID
		if(StringUtils.isEmpty(prjId)){
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo(SysLogConstant.LOG_CMM_DATA_PK_IS_EMPTY);
			BaseLogUtils.info(logger, "submitCredit", SysLogConstant.LOG_CMM_DATA_PK_IS_EMPTY, CurrentThreadContext.getCurrentUserName());
			return result;
		}
		
		try {
			PrjBscInfoVO prjBscInfoVO = this.prjBscInfoService.selectById(Long.valueOf(prjId));
			BaseLogUtils.info(logger, "submitCredit", "===查询项目信息End===prjId:"+prjId+",prjBscInfoVO:"+JSON.toJSONString(prjBscInfoVO), CurrentThreadContext.getCurrentUserName());
			PrjPrdPaySchMQueryCondition paySchQC = new PrjPrdPaySchMQueryCondition();
			paySchQC.setPrjId(Long.valueOf(prjId));
            paySchQC.setPaySchTypCd(PrjPrdPaySchMConstant.PAY_SCH_TYP_CD_WS);
            List<PrjPrdPaySchMVO> prjPrdPaySchMDTOList = this.prjPrdPaySchMService.searchList(paySchQC);
			//浙商
			if (PrjBscInfoConstant.PRJ_INS_CODE_ZS.equals(prjBscInfoVO.getInsCode())) {
				BaseLogUtils.info(logger, "submitCredit", "===浙商==prjId:"+prjId);
				PrjPrdPaySchMQueryCondition pppsmqc = new PrjPrdPaySchMQueryCondition();
				pppsmqc.setPrjId(Long.valueOf(prjId));
				pppsmqc.setIsSqBiz(BaseConstant.IS_YESNO_NO);
                paySchQC.setPaySchTypCd(PrjPrdPaySchMConstant.PAY_SCH_TYP_CD_ZF);
				BaseLogUtils.info(logger, "submitCredit", "=查询项目支付表信息Start=prjId:"+prjId);
				List<PrjPrdPaySchMVO> mList = this.prjPrdPaySchMService.searchList(pppsmqc);
				BaseLogUtils.info(logger, "submitCredit", "=查询项目支付表信息End=prjId:"+prjId+",mList:"+JSON.toJSONString(mList));
				Long paySchId = null;
				for (PrjPrdPaySchMVO prjPrdPaySchMVO : mList) {
					paySchId = prjPrdPaySchMVO.getId();
					break;
				}
				//创建客户信息发送到浙商
				BaseLogUtils.info(logger, "submitCredit", "=创建客户信息发送到浙商Start=prjId:"+prjId+",fundRasInsId:"+prjBscInfoVO.getFundRasInsId()+",paySchId:"+paySchId);
				MessageDTO<String> messageDTO = this.czbankApi.submitCredit(prjBscInfoVO.getFundRasInsId(), Long.valueOf(prjId), paySchId);
				BaseLogUtils.info(logger, "submitCredit", "=创建客户信息发送到浙商End=prjId:"+prjId+",messageDTO:"+JSON.toJSONString(messageDTO));
				if(null!=messageDTO && messageDTO.isSuccess()){
					result.setSuccess(BaseConstant.IS_YESNO_YES);
					result.setInfo("创建客户信息发送到浙商成功,请等待处理结果.");
				}else if(null!=messageDTO && !messageDTO.isSuccess()){
					result.setSuccess(BaseConstant.IS_YESNO_NO);
					result.setInfo("创建客户信息发送到浙商失败,请联系管理员."+messageDTO.getMessage());
				}else{
					result.setSuccess(BaseConstant.IS_YESNO_NO);
					result.setInfo("创建客户信息发送到浙商失败,请联系管理员.");
				}
			}else if (PrjBscInfoConstant.PRJ_INS_CODE_WS.equals(prjBscInfoVO.getInsCode())) {
                BaseLogUtils.info(logger, "submitCredit", "===网商==prjId:"+prjId);
				//网商
        		BaseLogUtils.info(logger, "submitCredit", "=资管-网商 机构代客户申贷Start=prjId:"+prjId);
        		fl.alipay.facade.dto.MessageDTO<String> messageDTO = this.alipayApiService.applyLoan(Long.valueOf(prjId));
        		BaseLogUtils.info(logger, "submitCredit", "=资管-网商 机构代客户申贷End=prjId:"+prjId+",messageDTO:"+JSON.toJSONString(messageDTO));
        		if(null!=messageDTO && messageDTO.isSuccess()){
					result.setSuccess(BaseConstant.IS_YESNO_YES);
					result.setInfo("提交客户申贷请求成功,请等待处理结果.");
				}else if(null!=messageDTO && !messageDTO.isSuccess()){
					result.setSuccess(BaseConstant.IS_YESNO_NO);
					result.setInfo("提交客户申贷请求失败,请联系管理员."+messageDTO.getMessage());
				}else{
					result.setSuccess(BaseConstant.IS_YESNO_NO);
					result.setInfo("提交客户申贷请求失败,请联系管理员.");
				}
			}else if(PrjBscInfoConstant.PRJ_INS_CODE_SPD.equals(prjBscInfoVO.getInsCode())){
                //浦发
                BaseLogUtils.info(logger, "submitCredit", "=资管-浦发 网贷准入校验Start=prjId:"+prjId);
                PrjBscInfoVO prjBscInfo = this.prjBscInfoService.selectById(Long.valueOf(prjId));
                MessageDTO<String> messageDTO = spdbankApi.submitCredit(prjBscInfo.getFundRasInsId(),Long.valueOf(prjId));
                BaseLogUtils.info(logger, "submitCredit", "=资管-浦发 网贷准入校验End=prjId:"+prjId+",messageDTO:"+JSON.toJSONString(messageDTO));
                if(null!=messageDTO && messageDTO.isSuccess()){
                    result.setSuccess(BaseConstant.IS_YESNO_YES);
                    result.setInfo("提交浦发网贷准入校验成功,请等待处理结果.");
					BaseLogUtils.info(logger, "addApplyLoanAgain", "=调用浦发网贷个人客户必要信息查询Start=prjId:"+prjId+",fId:"+prjBscInfo.getFundRasInsId());
					MessageDTO<String> verifyIdentificationDTO = spdbankApi.verifyIdentification(prjBscInfo.getFundRasInsId(),Long.valueOf(prjId));
					BaseLogUtils.info(logger, "addApplyLoanAgain", "=调用浦发网贷个人客户必要信息查询End=prjId:"+prjId+",verifyIdentificationDTO:"+JSON.toJSONString(verifyIdentificationDTO));
					if(null==verifyIdentificationDTO){
						result.setSuccess(BaseConstant.IS_YESNO_NO);
						result.setInfo("提交浦发网贷准入校验请求失败-个人客户必要信息,请联系管理员.");
					}else if(!verifyIdentificationDTO.isSuccess()){
						result.setSuccess(BaseConstant.IS_YESNO_NO);
						if(StringUtils.isNotEmpty(verifyIdentificationDTO.getMessage())){
							result.setInfo("提交浦发网贷准入校验失败,"+verifyIdentificationDTO.getMessage());
						}else{
							result.setInfo("提交浦发网贷准入校验请求失败-个人客户必要信息,请联系管理员.");
						}
					}
                }else if(null!=messageDTO && !messageDTO.isSuccess()){
                    result.setSuccess(BaseConstant.IS_YESNO_NO);
                    result.setInfo("提交浦发网贷准入校验失败,请联系管理员."+messageDTO.getMessage());
                }else{
                    result.setSuccess(BaseConstant.IS_YESNO_NO);
                    result.setInfo("提交浦发网贷准入校验请求失败,请联系管理员.");
                }
            }else{
                BaseLogUtils.info(logger, "submitCredit", "===默认==prjId:"+prjId);
				List<Long> paySchIds = new ArrayList<Long>();
				//过滤掉上装支付表
				List<Long> exclusivePrjPaySchIds = new ArrayList<Long>();
				PrjPrdBscInfoQueryCondition ppbiQC = new PrjPrdBscInfoQueryCondition();
				ppbiQC.setPrjId(Long.valueOf(prjId));
				BaseLogUtils.info(logger, "submitCredit", "=查询项目产品信息Start=prjId:"+prjId);
				List<PrjPrdBscInfoVO> prjPrdBscInfoVOList = this.prjPrdBscInfoService.searchList(ppbiQC);
				BaseLogUtils.info(logger, "submitCredit", "=查询项目产品信息End=prjId:"+prjId+",prjPrdBscInfoVOList:"+JSON.toJSONString(prjPrdBscInfoVOList));
				List<Long> exclusivePrjPrdIds = new ArrayList<Long>();
				if(CollectionUtils.isNotEmpty(prjPrdBscInfoVOList)){
					for (PrjPrdBscInfoVO prjPrdBscInfoVO : prjPrdBscInfoVOList) {
						if(CarStyleConstant.PRD_TYP_8.equals(prjPrdBscInfoVO.getPrdTypCd())){
							exclusivePrjPrdIds.add(prjPrdBscInfoVO.getId());
						}
					}
				}
				PrjPrdDtlQueryCondition ppdQC = new PrjPrdDtlQueryCondition();
				ppdQC.setPrjId(Long.valueOf(prjId));
				BaseLogUtils.info(logger, "submitCredit", "=查询项目产品明细Start=prjId:"+prjId);
				List<PrjPrdDtlVO> prjPrdDtlVOList = this.prjPrdDtlService.selectList(ppdQC);
				BaseLogUtils.info(logger, "submitCredit", "=查询项目产品明细End=prjId:"+prjId+",prjPrdDtlDTOList:"+JSON.toJSONString(prjPrdDtlVOList));
				if(CollectionUtils.isNotEmpty(prjPrdDtlVOList)){
					for (PrjPrdDtlVO prjPrdDtlVO : prjPrdDtlVOList) {
						if(exclusivePrjPrdIds.contains(prjPrdDtlVO.getPrjPrdId())){
							exclusivePrjPaySchIds.add(prjPrdDtlVO.getPaySchId());
						}
					}
				}
				for (PrjPrdPaySchMVO prjPrdPaySchMVO : prjPrdPaySchMDTOList) {
					if(exclusivePrjPaySchIds.contains(prjPrdPaySchMVO.getId())){
						continue;
					}
					paySchIds.add(prjPrdPaySchMVO.getId());
				}
				BaseLogUtils.info(logger, "submitCredit", "===提交征信Start===prjId:"+prjId+",insId:"+prjBscInfoVO.getFundRasInsId()+",insCd:"+prjBscInfoVO.getInsCode()+",paySchIds:"+JSON.toJSONString(paySchIds), CurrentThreadContext.getCurrentUserName());
				cmm.mid.core.framework.dto.MessageDTO<String> messageDTO;
				if(PrjBscInfoConstant.PRJ_TYP_CD_GHKD.equals(prjBscInfoVO.getPrjTypCd())){
					messageDTO = this.tripartiteApi.submitCredit(171225242000321L, "icbc", Long.valueOf(prjId), paySchIds);
				}else{
                    BaseLogUtils.info(logger, "submitCredit", "===默认end==prjId:"+prjId);
					messageDTO = this.tripartiteApi.submitCredit(prjBscInfoVO.getFundRasInsId(), prjBscInfoVO.getInsCode(), Long.valueOf(prjId), paySchIds);
				}
				BaseLogUtils.info(logger, "submitCredit", "===提交征信End===prjId:"+prjId+",messageDTO:"+JSON.toJSONString(messageDTO));
				if(null!=messageDTO && messageDTO.isSuccess()){
					result.setSuccess(BaseConstant.IS_YESNO_YES);
					result.setInfo("提交征信成功,请等待处理结果.");
				}else if(null!=messageDTO && !messageDTO.isSuccess()){
					result.setSuccess(BaseConstant.IS_YESNO_NO);
					result.setInfo("提交征信失败,请联系管理员."+messageDTO.getMessage());
				}else{
					result.setSuccess(BaseConstant.IS_YESNO_NO);
					result.setInfo("提交征信失败,请联系管理员.");
				}
			}
			
			BaseLogUtils.info(logger, "submitCredit", "发送征信查询请求成功.prjId:"+prjId, CurrentThreadContext.getCurrentUserName());
		} catch (BaseException ex) {
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo(ex.getMessage());
			BaseLogUtils.info(logger, "submitCredit", "发送征信查询请求失败.DATA:"+prjId+".ERROR:"+ex.getMessage(), CurrentThreadContext.getCurrentUserName());
			ex.printStackTrace();
		}catch (Exception ex) {
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo(SysLogConstant.LOG_CMM_SYS_ERROR+ex.getMessage());
			BaseLogUtils.error(logger, "submitCredit", "发送征信查询请求请求失败,系统错误.DATA:"+prjId+".ERROR:"+ex.getMessage(), CurrentThreadContext.getCurrentUserName());
			ex.printStackTrace();
		}
		return result;
	}
    
    /**
	 * 到第三方工行卡贷城配上装评审 流程附加信息页面 - 临时过渡使用
	 */
	@RequestMapping(value = "/toTempAdditionalInfoPage.do", method = { RequestMethod.GET, RequestMethod.POST })
	public ModelAndView toTempAdditionalInfoPage(HttpServletRequest request, HttpServletResponse response) {
		String projectId = request.getParameter("projectId");//项目ID
		String proIntId = request.getParameter("processInstanceId");//流程实例ID
		String taskId = request.getParameter("taskId");//任务ID
		String taskDefKey = request.getParameter("taskDefKey");//任务KEY
		String isDetail = request.getParameter("isDetail");//1:其他节点 0:信审节点
		String taskNm = request.getParameter("taskNm");//任务名称
		String ctrlKey = request.getParameter("ctrlKey");//资料标识//控制键 1.可上传、下载、删除 2.可验证 3.不可操作
		ModelAndView view = new ModelAndView("project/additionalInfo/tempAudNodeAdditionalInfo");
		try {
			view.addObject("projectId", projectId);
			view.addObject("proIntId", proIntId);
			view.addObject("taskId", taskId);
			view.addObject("taskDefKey", taskDefKey);
			view.addObject("taskNm", taskNm);
			view.addObject("isDetail", isDetail);
			view.addObject("ctrlKey", ctrlKey);

			// 信审员初审，新能源汽车快捷报单流程 三方资管城配业务工行评审流程 重卡城配项目评审流程 信审员审核
			if((StringUtils.isNotEmpty(taskNm) && (taskNm.indexOf("信审") != -1 && taskNm.indexOf("初审") != -1))
					|| "FLOW_00000001_001_001_001".equals(taskDefKey) || "FLOW_00000013_001_002_001".equals(taskDefKey) || "FLOW_00000001_001_004_001".equals(taskDefKey)) {
				view.addObject("fromCAFlag", true);
			}
			
			String confirmPay = request.getParameter("confirmPay");//付款审核 1:可以审核付款可以取消放款 2:只可以审核不可以取消
			view.addObject("confirmPay", confirmPay);
			String version = request.getParameter("version");
			view.addObject("version", version);
			
			//征信附议
//		String showCredit = request.getParameter("showCredit");//是否显示
//		view.addObject("showCredit", showCredit);
//		String flag = request.getParameter("flag");//征信标识
//		view.addObject("flag", flag);
			
			//查询项目信息
			PrjBscInfoVO prjBscInfoVO = null;
			String mp = "";//客户经理手机号
			if(StringUtils.isNotEmpty(projectId)){
				prjBscInfoVO = this.prjBscInfoService.selectById(Long.valueOf(projectId));
				if(null!=prjBscInfoVO && StringUtils.isNotEmpty(prjBscInfoVO.getCstMgrId())){
					SysUsrVO sysUsrVO = this.sysUsrService.selectById(prjBscInfoVO.getCstMgrId(), CurrentThreadContext.getCurrentSysCd());
					if(null!=sysUsrVO && StringUtils.isNotBlank(sysUsrVO.getMp())){
						mp = sysUsrVO.getMp();
					}
				}
			}
			view.addObject("mp", mp);
			view.addObject("prjTypCd", prjBscInfoVO.getPrjTypCd());
			view.addObject("buOrgCd", prjBscInfoVO.getBuOrgCd());
			
			String cstLvlCdNm = "";
			if(null!=prjBscInfoVO && StringUtils.isNotEmpty(prjBscInfoVO.getCstId())){
				String orgCd = prjBscInfoVO.getCstMgrOrgCd();
				String buOrgCd = "";
				if(orgCd!=null&&orgCd.length()>8){
					buOrgCd = orgCd.substring(0,8);
				}
				CstBscInfoVO cstBscInfoVO = this.cstBscInfoService.selectDetailBy(prjBscInfoVO.getCstId(),orgCd,buOrgCd);
				if(null!=cstBscInfoVO){
					cstLvlCdNm = cstBscInfoVO.getCstLvlCdNm();
				}
				
			}
			view.addObject("cstLvlCdNm", cstLvlCdNm);
			
			//查询项目产品信息 取产品类型传到页面 刷新车辆运营动态字段
			String prdTypCd = "";
			PrjPrdBscInfoQueryCondition prjPrdQc = new PrjPrdBscInfoQueryCondition();
			if(StringUtils.isNotEmpty(projectId)){
				prjPrdQc.setPrjId(Long.valueOf(projectId));
			}
			List<PrjPrdBscInfoVO> prjPrdBscInfoVOList = this.prjPrdBscInfoService.searchList(prjPrdQc);
			if(CollectionUtils.isNotEmpty(prjPrdBscInfoVOList)){
				prdTypCd = prjPrdBscInfoVOList.get(0).getPrdTypCd();
			}
			view.addObject("prdTypCd", prdTypCd);
			//根据所查到的产品类型 查询映射表配置 获得哪些产品类型有数据需要实例化
			List<String> tCodeList = new ArrayList<String>();
			if(CollectionUtils.isNotEmpty(prjPrdBscInfoVOList)){
				List<String> sCodeList = new ArrayList<String>();
				for (PrjPrdBscInfoVO prjPrdBscInfoVO : prjPrdBscInfoVOList) {
					if(!sCodeList.contains(prjPrdBscInfoVO.getPrdTypCd().substring(0, 3))){
						sCodeList.add(prjPrdBscInfoVO.getPrdTypCd().substring(0, 3));
					}
				}
				if(CollectionUtils.isNotEmpty(sCodeList)){
					SysCdMapDQueryCondition cdMapDQC = new SysCdMapDQueryCondition();
					cdMapDQC.setSysCd(CurrentThreadContext.getCurrentSysCd());
					cdMapDQC.setOrgCd(CurrentThreadContext.getCurrentOrgCd());
					cdMapDQC.setmTypCd("M0006");
					cdMapDQC.setsCodeList(sCodeList);
					List<SysCdMapDDTO> sysCdMapDList = this.sysCdMapApiService.searchSysCdMapDWithTargetList(cdMapDQC);
					if(CollectionUtils.isNotEmpty(sysCdMapDList)){
						for (SysCdMapDDTO sysCdMapDDTO : sysCdMapDList) {
							if(!tCodeList.contains(sysCdMapDDTO.getTCode())){
								tCodeList.add(sysCdMapDDTO.getTCode());
							}
						}
					}
				}
			}
			StringBuffer tCodeString = new StringBuffer();
			if(CollectionUtils.isNotEmpty(tCodeList)){
				for (String string : tCodeList) {
					tCodeString.append(string+";");
				}
				view.addObject("tCodeString", tCodeString.substring(0, tCodeString.length()-1).toString());
			}
			
			//设备大类
			List<KeyValueVO> equCategoryCdList = this.prjBscInfoService.searchEquCategoryCdList(CurrentThreadContext.getCurrentSysCd(), prjBscInfoVO.getBuOrgCd());
			view.addObject("equCategoryCdListJSON", JSON.toJSONString(equCategoryCdList));
			//车辆级别
			List<KeyValueVO> carLevelCdList = this.prjBscInfoService.searchCarLevelCdList();
			view.addObject("carLevelCdListJSON", JSON.toJSON(carLevelCdList));
			//农机设备大类
//		List<KeyValueVO> farmEquCategoryCdList = this.prjBscInfoService.searchFarmEquCategoryCdList();
//		view.addObject("farmEquCategoryCdListJSON", JSON.toJSON(farmEquCategoryCdList));

			//收入方式
			List<KeyValueVO> profitCdList = this.audReturnVisitService.searchProfitCdList(CurrentThreadContext.getCurrentSysCd(), prjBscInfoVO.getBuOrgCd());
			view.addObject("profitCdList", profitCdList);
			//运营年限/本地生活年限
			List<KeyValueVO> bizExpList = this.audReturnVisitService.searchBizExpList();
			view.addObject("bizExpList", bizExpList);
			//主货物大类
			List<KeyValueVO> mainGdsTypCdList = this.audCreditInfoService.searchGoodsTypListByLvl("1");
			view.addObject("mainGdsTypCdList", mainGdsTypCdList);
			//货物来源
			List<KeyValueVO> goodsResList = this.audReturnVisitService.searchGoodsResList();
			view.addObject("goodsResList", goodsResList);
			//主货物结算方式
			List<KeyValueVO> gdsStlWayCdList = this.audReturnVisitService.searchGdsStlWayCdList();
			view.addObject("gdsStlWayCdList", gdsStlWayCdList);
			//司机情况
			List<KeyValueVO> driverList = this.audReturnVisitService.searchDriverList();
			view.addObject("driverList", driverList);
			//第二还款来源
			List<KeyValueVO> secondPayResCdList = this.audReturnVisitService.searchSecondPayResCdList();
			view.addObject("secondPayResCdList", secondPayResCdList);
			
			//是否
			List<KeyValueVO> yesOrNoCdList = this.audStandingBookService.searchYesOrNoCdList();
			view.addObject("yesOrNoCdList", yesOrNoCdList);
			//流程审核意见
			List<KeyValueVO> processOpinionCdList = this.audStandingBookService.searchProcessOpinionCdList();
			view.addObject("processOpinionCdList", processOpinionCdList);
			//客户经理评级
			List<KeyValueVO> cstMgrLvlCdList = this.audInterviewInfoService.searchCstMgrLvlCdList();
			view.addObject("cstMgrLvlCdList", cstMgrLvlCdList);
			//首付款来源
			List<KeyValueVO> firstPayResCdList = this.audInterviewInfoService.searchFirstPayResCdList();
			view.addObject("firstPayResCdList", firstPayResCdList);
			//风控评级
			List<KeyValueVO> riskCtrlLvlCdList = this.audInterviewInfoService.searchRiskCtrlLvlCdList();
			view.addObject("riskCtrlLvlCdList", riskCtrlLvlCdList);
		}catch (Exception e) {
			BaseLogUtils.info(logger, "toTempAdditionalInfoPage", "=加载toTempAdditionalInfoPage页面异常=", CurrentThreadContext.getCurrentUserName());
			e.printStackTrace();
		}
		
		return view;
	}
	/**
	 * 信审修改是否团单
	 */
	@RequestMapping(value = "/modifyIsGrpBiz.do", method = { RequestMethod.POST })
	@ResponseBody
	public Object modifyIsGrpBiz(HttpServletRequest request, HttpServletResponse response) throws BaseException {
		DataResultVO result = new DataResultVO(BaseConstant.IS_YESNO_YES,SysLogConstant.LOG_CMM_OPERATE_SUCC);
		String prjId = request.getParameter("prjId");
		String isGrpBiz = request.getParameter("isGrpBiz");
		String accNo = request.getParameter("accNo");
		String prjQuatPrpsId = request.getParameter("prjQuatPrpsId");
		String policyTypCd = request.getParameter("policyTypCd");
		String mthInc = request.getParameter("mthInc");//月收入
		String cstId = request.getParameter("cstId");//客户ID
		String rgnPrCd = request.getParameter("rgnPrCd");//省
		String rgnCyCd =request.getParameter("rgnCyCd"); //市
		String isSmallBus = request.getParameter("isSmallBus");//是否小微企业
		String isSelfMelt = request.getParameter("isSelfMelt");//是否自融
		String tolPsonlAst = request.getParameter("tolPsonlAst");//个人总资产
		String prjCstAccId = request.getParameter("prjCstAccId");//项目客户账户id
		if(StringUtils.isEmpty(isGrpBiz)){
			throw new BaseException(BaseExceptionConstant.BASE_EXCEPTION_CODE_600, "是否团单不能为空.");
		}
		if(StringUtils.isEmpty(prjId)){
			throw new BaseException(BaseExceptionConstant.BASE_EXCEPTION_CODE_600, "项目ID不能为空.");
		}
		PrjBscInfoVO entity = new PrjBscInfoVO();
		try {
			entity.setId(Long.valueOf(prjId));
			entity.setIsGrpBiz(Integer.valueOf(isGrpBiz));
			entity.setRgnPrCd(rgnPrCd);
			entity.setRgnCyCd(rgnCyCd);
			if(StringUtils.isNotBlank(accNo)){
			   PrjCstAccInfoVO 	accInfoVO = new PrjCstAccInfoVO();
			   accInfoVO.setAccNo(accNo);
			   entity.setPrjCstAccInfoVO(accInfoVO);
			}
			if (StringUtils.isNotBlank(isSelfMelt)){
				entity.setIsSelfMelt(Integer.valueOf(isSelfMelt));
			}
			boolean success = this.projectApiService.modifyPrjBscInfo2(PrjBscInfoVOTransform.toDTO(entity));
			// 修改方案政策类型
			if (StringUtils.isNotBlank(prjQuatPrpsId) && StringUtils.isNotBlank(policyTypCd)) {
				PrjQuatPrpsVO prjQuatPrpsVo = new PrjQuatPrpsVO();
				prjQuatPrpsVo.setId(Long.parseLong(prjQuatPrpsId));
				prjQuatPrpsVo.setPolicyTypCd(policyTypCd);
				this.prjQuatPrpsService.modifyPrjQuatPrps(prjQuatPrpsVo);
			}
			if(!success){
				result.setSuccess(BaseConstant.IS_YESNO_NO);
				result.setInfo(SysLogConstant.LOG_CMM_OPERATE_FAIL);
				BaseLogUtils.info(logger, "modifyIsGrpBiz", "信审修改是否团单失败.DATA:"+JSONObject.toJSONString(entity), CurrentThreadContext.getCurrentUserName());
				return result;
			}
			if(StringUtils.isNotEmpty(mthInc) && StringUtils.isNotEmpty(cstId)){
				//修改月收入
				CstNpBscInfoDTO cstNpDTO = new CstNpBscInfoDTO();
				cstNpDTO.setId(Long.valueOf(cstId));
				cstNpDTO.setYrInc(DecimalUtils.convertYuanToFen(DecimalUtils.mul(Double.valueOf(mthInc), 12)));
				boolean modifyCstNpBscInfo = this.customerModifyApiService.modifyCstNpBscInfo(cstNpDTO);
				if(!modifyCstNpBscInfo){
					result.setSuccess(BaseConstant.IS_YESNO_NO);
					result.setInfo(SysLogConstant.LOG_CMM_OPERATE_FAIL);
					BaseLogUtils.info(logger, "modifyIsGrpBiz", "信审修改月收入失败.cstNpDTO:"+JSONObject.toJSONString(cstNpDTO), CurrentThreadContext.getCurrentUserName());
					return result;
				}
			}
			if(StringUtils.isNotEmpty(isSmallBus) && StringUtils.isNotEmpty(cstId)){
				CstBscInfoDTO cstBscInfo = this.customerQueryApiService.getCstBscInfoById(Long.valueOf(cstId));
				if(cstBscInfo != null){
					if(CustomerConstant.CST_TYP_CD_NP.equals(cstBscInfo.getCstTypCd())){
						//修改是否小微企业
						CstNpBscInfoDTO cstNpDTO = new CstNpBscInfoDTO();
						cstNpDTO.setId(Long.valueOf(cstId));
						cstNpDTO.setIsSmallBus(Integer.valueOf(isSmallBus));
						boolean modifyCstNpBscInfoIsSmallBus = this.customerModifyApiService.modifyCstNpBscInfo(cstNpDTO);
						if(!modifyCstNpBscInfoIsSmallBus){
							result.setSuccess(BaseConstant.IS_YESNO_NO);
							result.setInfo(SysLogConstant.LOG_CMM_OPERATE_FAIL);
							BaseLogUtils.info(logger, "modifyIsSmallBus", "信审修改小微企业失败.cstNpDTO:"+JSONObject.toJSONString(cstNpDTO), CurrentThreadContext.getCurrentUserName());
							return result;
						}
					}
				}else{
					throw new BaseException("客户信息异常");
				}
			}
			BaseLogUtils.info(logger, "modifyIsGrpBiz", "信审修改是否团单成功.DATA:"+JSONObject.toJSONString(entity), CurrentThreadContext.getCurrentUserName());
			if(StringUtils.isNotEmpty(tolPsonlAst) && StringUtils.isNotEmpty(prjCstAccId)){
				//修改个人总资产
				PrjCstAccInfoVO prjCstAccInfoVO = new PrjCstAccInfoVO();
				prjCstAccInfoVO.setId(Long.valueOf(prjCstAccId));
				prjCstAccInfoVO.setTolPsonlAst(DecimalUtils.convertYuanToFen(DecimalUtils.mul(Double.valueOf(tolPsonlAst), 100*100)));
				boolean modifyPrjCstAccInfo = this.prjCstAccInfoService.modify(prjCstAccInfoVO);
				if(!modifyPrjCstAccInfo){
					result.setSuccess(BaseConstant.IS_YESNO_NO);
					result.setInfo(SysLogConstant.LOG_CMM_OPERATE_FAIL);
					BaseLogUtils.newWebLogger("信审修改个人总资产失败.modifyPrjCstAccInfo:"+JSONObject.toJSONString(modifyPrjCstAccInfo)).info();
					return result;
				}
			}
		}catch (BaseException ex) {
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo(SysLogConstant.LOG_CMM_SYS_ERROR+ex.getMessage());
			BaseLogUtils.info(logger, "modifyIsGrpBiz", "信审修改是否团单失败.DATA:"+JSONObject.toJSONString(entity)+".ERROR:"+ex.getMessage(), CurrentThreadContext.getCurrentUserName(),ex);
		}catch (Exception ex) {
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo(SysLogConstant.LOG_CMM_SYS_ERROR+ex.getMessage());
			BaseLogUtils.error(logger, "modifyIsGrpBiz", "信审修改是否团单失败,系统错误.DATA:"+JSONObject.toJSONString(entity)+".ERROR:"+ex.getMessage(), CurrentThreadContext.getCurrentUserName(),ex);
		}
		return result;
	}

	/**
	 * 是否弹出随州垫款流程弹框
	 * @methodName checkExpatriateFlowAuth
	 * @author: liuqihao@lionbridgecapital.cn
	 * @createDate: 2020-01-19 14:43
	 * @version: V1.0.0
	 * @param request
	 * @param response
	 * @Return java.lang.Object
	 * @updateRemark [序号][YYYY-MM-DD] [更改人姓名][变更描述]
	 */
	@RequestMapping(value = "/checkExpatriateFlowAuth.do", method = { RequestMethod.POST })
	@ResponseBody
	public Object checkExpatriateFlowAuth(HttpServletRequest request, HttpServletResponse response) throws BaseException {
		DataResultVO result = new DataResultVO(BaseConstant.IS_YESNO_YES, "可发起随州垫款流程");
		String prjId = request.getParameter("prjId");
		String capPayId = request.getParameter("capPayId");
		if (StringUtils.isEmpty(prjId)) {
			throw new BaseException(BaseExceptionConstant.BASE_EXCEPTION_CODE_600, "项目id不能为空.");
		}
		try {
			BaseLogUtils.newWebLogger("随州垫款流程弹窗权限校验start, prjId:" + prjId + ",capPayId:" + capPayId).info();
			result = this.prjAuditFlowService.checkExpatriateFlowAuth(prjId, capPayId);
			BaseLogUtils.newWebLogger("随州垫款流程弹窗权限校验end, result:" + JSON.toJSONString(result)).info();
			if (null == result) {
				result.setSuccess(BaseConstant.IS_YESNO_NO);
				result.setInfo("随州垫款流程弹窗权限校验返回null");
			}
		}catch (BaseException ex) {
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo(ex.getMessage());
			BaseLogUtils.newWebLogger("随州垫款流程弹窗权限校验异常, result:" + JSON.toJSONString(result)).info();
		}catch (Exception ex) {
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo(SysLogConstant.LOG_CMM_SYS_ERROR);
			BaseLogUtils.newWebLogger("随州垫款流程弹窗权限校验系统异常, ex:" + ex.getMessage()).setThrowable(ex).error(LogExceptionEnum.COMMON_CODE_0002);
		}
		return result;
	}

	private FlowStartParamsDTO setProductKeywords(FlowStartParamsDTO flowStartParamsDTO, PrjBscInfoVO prjBscInfoVO) {
		StringBuffer keyWords = new StringBuffer();
		if (null != prjBscInfoVO) {
			keyWords.append(prjBscInfoVO.getPrjNm() + FlowConstant.FLOW_TASK_BACK_USR_DISPLAY_SEPERATOR);//项目名称
			keyWords.append(prjBscInfoVO.getCstNm());//客户名称
			//设置关键字
			flowStartParamsDTO.setSearchDesc(keyWords.toString());
			//客户ID 客户名称
			flowStartParamsDTO.setCstId(String.valueOf(prjBscInfoVO.getCstId()));
			flowStartParamsDTO.setCstNm(prjBscInfoVO.getCstNm());
		}
		BaseLogUtils.newLogger("setProductKeywords===设置流程关键字===flowStartParamsDTO:" + JSON.toJSONString(flowStartParamsDTO)).info();
		return flowStartParamsDTO;
	}

	/**
	 * 风险标记
	 * @param request
	 * @param response
	 * @return
	 * @throws BaseException
	 */
	@RequestMapping(value = "/checkRiskSign.do", method = {RequestMethod.GET})
	@ResponseBody
	public Object checkRiskSign(HttpServletRequest request, HttpServletResponse response) throws BaseException {
		DataResultVO result = new DataResultVO(BaseConstant.IS_YESNO_YES, "校验通过");
		try {
			BaseLogUtils.newLogger("校验主体黑名单Start,入参,request:{}", JSON.toJSONString(request.getParameterMap())).info();
			String prjId = request.getParameter("prjId");
			String capPayId = request.getParameter("capPayId");
			String flow = request.getParameter("flow");
			if (StringUtils.isBlank(prjId) || StringUtils.isBlank(flow)) {
				result.setSuccess(BaseConstant.IS_YESNO_NO);
				result.setInfo(SysLogConstant.LOG_CMM_DATA_PK_IS_EMPTY);
				return result;
			}
			Map<String, Boolean> checkMap = new HashMap<>();
			if (RiskCheckTypEnum.PRJ_FLOW.key.equals(flow)) {
				checkMap.put(RiskCheckTypEnum.PRD_BLACK.key, true);
				capPayId = null;
			}
			DataResultDTO checkResult = this.projectApiService.checkFlowPassBlack(flow, Long.valueOf(prjId), StringUtils.isNotBlank(capPayId)?Long.valueOf(capPayId):null, checkMap);
			BaseLogUtils.newLogger("校验主体黑名单结果End,prjId:{},checkResult:{}", prjId, JSON.toJSONString(checkResult)).info();
			if (null != checkResult && BaseConstant.IS_YESNO_NO == checkResult.getSuccess()) {
				throw new BaseException(checkResult.getInfo());
			}
		} catch (BaseException ex) {
			BaseLogUtils.newLogger("校验主体黑名单校验,异常,e:{}", ex.getMessage()).info();
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo(ex.getMessage());
		} catch (Exception ex) {
			BaseLogUtils.newLogger("校验主体黑名单校验,系统异常,e:{}", ex.getMessage()).setThrowable(ex).error(LogExceptionEnum.COMMON_CODE_0002);
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo("风险标识判断错误");
		}
		BaseLogUtils.newLogger("校验主体黑名单End,入参,request:{}, result:{}", JSON.toJSONString(request.getParameterMap()), JSON.toJSONString(result)).info();
		return result;
	}

	/**
	 * 初始化项目产品查看列表
	 */
	@SuppressWarnings("unchecked")
	@RequestMapping(value = "/initPrjPrdListByHC.do", method = { RequestMethod.GET})
	@ResponseBody
	public Object initPrjPrdListByHC(HttpServletRequest request, HttpServletResponse response) {
		String currentPage = request.getParameter("page");
		String pageSize = request.getParameter("pagesize");
		//项目ID
		String prjId = request.getParameter("prjId");
		//流程实例ID
		String proIntId = request.getParameter("proIntId");
		//产品ID
		String prjPrdId = request.getParameter("prjPrdId");
		try {
			if(StringUtils.isEmpty(prjPrdId) || StringUtils.isEmpty(prjId)){
				BaseLogUtils.info(logger, "initPrjPrdList", "初始化项目产品列表,产品ID不能为空.projectId:"+prjId, CurrentThreadContext.getCurrentUserName());
				return null;
			}
			//流程附加信息页面 不同大类产品列表标识
			String audPrjPrdListFlag = request.getParameter("audPrjPrdListFlag");
			if(StringUtils.isEmpty(audPrjPrdListFlag)){
				BaseLogUtils.info(logger, "initPrjPrdList", "初始化项目产品列表,产品列表标识不能为空.audPrjPrdListFlag:"+audPrjPrdListFlag, CurrentThreadContext.getCurrentUserName());
				return null;
			}
			//查询映射表 找到匹配一级产品类型 设置到查询条件里   :查询是用  prdTypCd like 'XX%'
			SysCdMapDQueryCondition cdMapDQC = new SysCdMapDQueryCondition();
			cdMapDQC.setSysCd(CurrentThreadContext.getCurrentSysCd());
			cdMapDQC.setOrgCd(CurrentThreadContext.getCurrentOrgCd());
			cdMapDQC.setmTypCd("M2006");
			List<SysCdMapDDTO> sysCdMapDList = this.sysCdMapApiService.searchSysCdMapDWithTargetList(cdMapDQC);
			List<String> prdTypCdList = new ArrayList<>();
			if(CollectionUtils.isNotEmpty(sysCdMapDList)){
				for (SysCdMapDDTO sysCdMapDDTO : sysCdMapDList) {
					if(audPrjPrdListFlag.equals(sysCdMapDDTO.getTCode())){
						prdTypCdList.add(sysCdMapDDTO.getSCode());
					}
				}
			}else{
				BaseLogUtils.info(logger, "initPrjPrdList", "初始化项目产品列表,查询产品类型映射结果为空.cdMapDQC:"+cdMapDQC+",sysCdMapDList:"+JSON.toJSONString(sysCdMapDList), CurrentThreadContext.getCurrentUserName());
				return null;
			}
			Pager page = new Pager();
			if (StringUtils.isNotEmpty(currentPage)) {
				page.setCurrentPage(Integer.parseInt(currentPage));
			}
			if (StringUtils.isNotEmpty(currentPage)) {
				page.setEveryPage(Integer.parseInt(pageSize));
			}

			PrjPrdBscInfoQueryCondition qc = new PrjPrdBscInfoQueryCondition();
			if(StringUtils.isNotBlank(prjId)){
				qc.setPrjId(Long.valueOf(prjId));
			}
			if(CollectionUtils.isNotEmpty(prdTypCdList)){
				qc.setPrdTypCdList(prdTypCdList);
			}
			if (StringUtils.isNotEmpty(prjPrdId)) {
				qc.setIdList(Arrays.asList(Long.valueOf(prjPrdId)));
			}
			qc.setChangeFlag(true);
			page.setCondition(qc);

			BaseLogUtils.info(logger, "initPrjPrdList", "===查询项目产品信息Start===page:"+JSON.toJSONString(page), CurrentThreadContext.getCurrentUserName());
			Pager pager = this.prjPrdBscInfoService.searchListPage(page);
			BaseLogUtils.info(logger, "initPrjPrdList", "===查询项目产品信息End===pager:"+JSON.toJSONString(pager), CurrentThreadContext.getCurrentUserName());
			List<PrjPrdBscInfoVO> list = (List<PrjPrdBscInfoVO>) pager.getResultList();

			if(CollectionUtils.isNotEmpty(list)){
				List<KeyValueVO> payWayCdList = this.prjBscInfoService.searchPayWayCdList(CurrentThreadContext.getCurrentSysCd(), "0000");
				//产品留购价*产品数量 设置为留购价
				for (PrjPrdBscInfoVO prjPrdBscInfoVO : list) {
					for(KeyValueVO keyValueVO : payWayCdList){
						if(StringUtils.isNotEmpty(prjPrdBscInfoVO.getPayWayCd())&&prjPrdBscInfoVO.getPayWayCd().equals(keyValueVO.getKey())){
							prjPrdBscInfoVO.setPayWayCdNm(keyValueVO.getValue());
							break;
						}
					}
					Double rsrvPc = prjPrdBscInfoVO.getRsrvPc();
					Integer prdQty = prjPrdBscInfoVO.getPrdQty();
					if(null!=rsrvPc && null!=prdQty){
						double purchaseFeeAmtSum = DecimalUtils.mul(rsrvPc, Double.valueOf(String.valueOf(prdQty)));
						prjPrdBscInfoVO.setPurchaseFeeAmtSum(purchaseFeeAmtSum);
					}
				}
			}

			//加入信审维护产品信息
			if(CollectionUtils.isNotEmpty(list)){
				//为防止页面产品列表报audCarInfoVO null 异常 先都设为空对象
				for (PrjPrdBscInfoVO prjPrdBscInfoVO : list) {
					prjPrdBscInfoVO.setAudCarInfoVO(new AudCarInfoVO());
				}
				//查询信审资料表
				if(StringUtils.isNotEmpty(proIntId)){
					AuditCreditInfoQueryCondition creditQC = new AuditCreditInfoQueryCondition();
					creditQC.setProIntId(proIntId);
					creditQC.setProjectId(Long.valueOf(prjId));
					AudCreditInfoVO audCreditInfoVO = this.audCreditInfoService.selectAudCreditInfoByQc(creditQC);
					BaseLogUtils.newLogger("查询信审资料数据audCreditInfoVO=" + JSON.toJSONString(audCreditInfoVO)).info();
					if (audCreditInfoVO != null && audCreditInfoVO.getId() != null) {
						Long creditInfoId = audCreditInfoVO.getId();
						if (null != creditInfoId) {
							List<Long> prjPrdIdList = new ArrayList<Long>();
							for (PrjPrdBscInfoVO prjPrdBscInfoVO : list) {
								prjPrdIdList.add(prjPrdBscInfoVO.getId());
							}
							AuditCarInfoQueryCondition condition = new AuditCarInfoQueryCondition();
							condition.setPrjPrdIdList(prjPrdIdList);
							condition.setCreditInfoId(creditInfoId);
							List<AudCarInfoVO> audCarInfoVOList = this.audCarInfoService.searchList(condition);
							if (CollectionUtils.isNotEmpty(audCarInfoVOList)) {
								for (AudCarInfoVO audCarInfoVO : audCarInfoVOList) {
									for (PrjPrdBscInfoVO prjPrdBscInfoVO : list) {
										if (prjPrdBscInfoVO.getId().equals(audCarInfoVO.getPrjPrdId())) {
											prjPrdBscInfoVO.setAudCarInfoVO(audCarInfoVO);
										}
									}
								}
							}
						}
					}
				}
			}
			BaseLogUtils.info(logger, "initList", "查询供应商逾期率和高风险预警接口开始=prjId:" + prjId, CurrentThreadContext.getCurrentUserName());
			if(CollectionUtils.isNotEmpty(list)){
				List<Long> splIds = new ArrayList();
				for (PrjPrdBscInfoVO prjPrdBscInfoVO : list){
					if (StringUtils.isNotEmpty(prjPrdBscInfoVO.getSplId())){
						CapChnOvdRateQC capChnOvdRateQC = new CapChnOvdRateQC();
						capChnOvdRateQC.setChnId(prjPrdBscInfoVO.getSplId());
						capChnOvdRateQC.setChnTypCd("1"); //1.供应商 2.挂靠公司
						capChnOvdRateQC.setOrderBy("OVD_MONTH");
						List<CapChnOvdRateDTO> capChnOvdRateDTOList = this.capChnOvdRateApiService.searchListByCondition(capChnOvdRateQC);
						BaseLogUtils.info(logger, "initList", "查询供应商逾期率返回：" + JSONObject.toJSONString(capChnOvdRateDTOList), CurrentThreadContext.getCurrentUserName());
						if (CollectionUtils.isNotEmpty(capChnOvdRateDTOList)){
							CapChnOvdRateDTO capChnOvdRateDTO = capChnOvdRateDTOList.get(0);
							prjPrdBscInfoVO.setEverRate(capChnOvdRateDTO.getEverRate()== null ? 0:capChnOvdRateDTO.getEverRate());//Ever逾期%
							prjPrdBscInfoVO.setPotRate(capChnOvdRateDTO.getPotRate()== null ? 0:capChnOvdRateDTO.getPotRate());//时点逾期%
						}else {
							prjPrdBscInfoVO.setEverRate(0d);//Ever逾期%
							prjPrdBscInfoVO.setPotRate(0d);//时点逾期%
						}
					} else {
						prjPrdBscInfoVO.setEverRate(0d);//Ever逾期%
						prjPrdBscInfoVO.setPotRate(0d);//时点逾期%
					}
					splIds.add(prjPrdBscInfoVO.getSplId());//供应商ids
				}
				SplHRiskWarnRecQC splHRiskWarnRecQC = new SplHRiskWarnRecQC();
				splHRiskWarnRecQC.setDataIdList(splIds);
				splHRiskWarnRecQC.setDataTyp("SPL"); //SPL:供应商  LNK:挂靠公司
				splHRiskWarnRecQC.setIsWarn(1);
				splHRiskWarnRecQC.setIsDel(0);
				splHRiskWarnRecQC.setIsValid(1);
				splHRiskWarnRecQC.setIsNew(1);
				List<SplHRiskWarnRecDTO> splHRiskWarnRecDTOList = splHRiskWarnRecApiService.checkSplHRiskWarnRecDTOByQC(splHRiskWarnRecQC,CurrentThreadContext.getCurrentSysCd(),CurrentThreadContext.getCurrentOrgCd(), WebBaseConstant.CHANNEL_CD);
				BaseLogUtils.info(logger, "initList", "查询供应商高风险预警接口返回：" + JSONObject.toJSONString(splHRiskWarnRecDTOList), CurrentThreadContext.getCurrentUserName());
				for (PrjPrdBscInfoVO prjPrdBscInfoVO : list){
					if (CollectionUtils.isNotEmpty(splHRiskWarnRecDTOList)){
						for (SplHRiskWarnRecDTO splHRiskWarnRecDTO : splHRiskWarnRecDTOList){
							if (Objects.equals(splHRiskWarnRecDTO.getDataId(), prjPrdBscInfoVO.getSplId())) {
								prjPrdBscInfoVO.setRiskWarnCd("1");
							}
						}
					}
				}
			}
			ListPageVO<PrjPrdBscInfoVO> listPage = new ListPageVO<>(list, pager.getTotalCount());
			BaseLogUtils.info(logger, "initPrjPrdList", "查询数据完成. DATA:" + JSONObject.toJSONString(page), CurrentThreadContext.getCurrentUserName());
			return listPage;
		}catch (Exception e) {
			BaseLogUtils.info(logger, "initPrjPrdList", "=初始化产品列表数据异常=prjId:"+prjId+","+e.getMessage());
			e.printStackTrace();
		}
		return null;
	}

}

